One Star

tCassandraInput: No keyspace has been specified

Hi there,
I am getting the following error message when I try to load data using the tCassandraInput component.
Exception in component tCassandraInput_1
com.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename
I have the keyspace values set and the tCassandraOutput component has successfully loaded records.
Any help would be really appreciated..
Thanks,
Graham
8 REPLIES
Moderator

Re: tCassandraInput: No keyspace has been specified

Hi,
Could you please post tCassandraInput component setting screenshot into forum?
Here is the component reference:TalendHelpCenter:tCassandraInput
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tCassandraInput: No keyspace has been specified

Hi,
Screenshots of the component and connection settings below.
I also included a screenshot of how I've connected the components...
Thanks,
Graham


One Star

Re: tCassandraInput: No keyspace has been specified

Hi,
Screenshots of the component and connection settings below.
I also included a screenshot of how I've connected the components...
Thanks,
Graham
                                                
                                                
One Star

Re: tCassandraInput: No keyspace has been specified

Component Setting:
One Star

Re: tCassandraInput: No keyspace has been specified

I'm not sure if you can see those screenshots:
Connection settings are:
DB Type: Cassandra
DB Version: Cassandra 2.2.x
Server: localhost
Port: 9042
Keyspace: devsmsfeed
Require Authentication: unchecked
I've tried the component using repository and built-in settings. Both produce the same error.
Component Settings are :
PROPERTY: Built-in
DB Version: Cassandra 2.2.x
Host: "localhost"
Port: "9042"
Keyspace: "devsmsfeed"
Column family: "users"
Schema: Built-In
Query: "select user_id,fname,lname from users"
If I change the port settings to 9162 I get the following error message instead:
Starting job sms_feed_to_mysql at 09:34 20/05/2016.
connecting to socket on port 3582
connected
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in component tCassandraConnection_1
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9160 (com.datastax.driver.core.exceptions.TransportException: Cannot connect), localhost/127.0.0.1:9160 (com.datastax.driver.core.exceptions.TransportException: Cannot connect))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1414)
at com.datastax.driver.core.Cluster.init(Cluster.java:162)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308)
at com.datastax.driver.core.Cluster.connect(Cluster.java:250)
at sms_feeds.sms_feed_to_mysql_0_1.sms_feed_to_mysql.tCassandraConnection_1Process(sms_feed_to_mysql.java:348)
at sms_feeds.sms_feed_to_mysql_0_1.sms_feed_to_mysql.runJobInTOS(sms_feed_to_mysql.java:1103)
disconnected
at sms_feeds.sms_feed_to_mysql_0_1.sms_feed_to_mysql.main(sms_feed_to_mysql.java:960)
Picked up _JAVA_OPTIONS: -Xmx1024M
Job sms_feed_to_mysql ended at 09:34 20/05/2016.
Employee

Re: tCassandraInput: No keyspace has been specified

Hello Graham
I see two errors one is referring to "keyspace does not exists" -> Can you check it by other means (other than talend) if it really exists? Or with tCassandraOutput component try to put in some date into that table. You need to define the keyspace.
Other error is merely connection error. Make sure if the host and port are correct provided in configuration
Thanks
Aniket
One Star

Re: tCassandraInput: No keyspace has been specified

Hi Aniket,
Thanks for your response. 
The output of the MySQL to Cassandra is detailed below. The output job ran successfully. The input job still fails.
The output component settings are:
Component Settings are :
PROPERTY: Built-in
DB Version: Cassandra 2.2.x
Host: "localhost"
Port: "9042"
Keyspace: "devsmsfeed"
Action on keyspace: Create keyspace if does not exist
Replica Strategy: SimpleStrategy
Replica Number: 1
Column family: "users"
Action on column family: "Create column if family does not exist"
Action on data: insert
Schema: Repository. NOSQL:devsmsfeed - users
Schema: Built-In
Query: "select user_id,fname,lname from users"
Proof that the Keyspace Exists
cqlsh> use devsmsfeed;
cqlsh:devsmsfeed> select * from users;
 user_id | fname   | lname
---------+---------+-------
       1 | GNWoods |     M
       2 |  GWoods |     M
(2 rows)
cqlsh:devsmsfeed>
Job Output
Starting job mysql_to_sms_feed at 14:08 20/05/2016.
connecting to socket on port 3928
connected
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
disconnected
Picked up _JAVA_OPTIONS: -Xmx1024M
Job mysql_to_sms_feed ended at 14:08 20/05/2016.
Moderator

Re: tCassandraInput: No keyspace has been specified

Hello,

Here exists a jira issue:https://jira.talendforge.org/browse/TBD-3086.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.