Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to define clustering keys in Cassandra table

I'm new in Talend Open Studio. I'm trying to use Cassandra through the Talend Open Studio for Big Data instead of CQL Shell due to the treatment of data. My question is: when creating a table (tCassandraInput) how do I set clustering key?
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
first, I suggest you use the Datastax API for all the tCassandra components. it based on the CQL
then when you using tCassandraOutput component to create column family, you can simply check the key checkbox of column in schema,
if there only one key column, then it will be the primary key
if there two or more key column, then the first one will be primary key, and others will be clustering columns
0683p000009MBXr.pngfor this setting, the generate CQL will be 
CREATE TABLE ks.tb (id text,\"song_order\" int,album text,PRIMARY KEY(id,\"song_order\"))
refer to the document: http://docs.datastax.com/en/cql/3.1/cql/ddl/ddl_compound_keys_c.html
song_order is the clustering column
Anonymous
Not applicable
Author

hello
What do you mean by Datastax?
I have the same problem, i want to create family column with composite key and then insert in the family columb by Tcassandra Output.
But in tCassandraOutput component, it is possible to select only 1 column like key column, do you have a solution?
regards
Anonymous
Not applicable
Author

Ok I understand , I have to select DataStax like API when  I define my connection