How to define clustering keys in Cassandra table

One Star

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?
Employee

Re: How to define clustering keys in Cassandra table

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
for 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
One Star

Re: How to define clustering keys in Cassandra table

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
One Star

Re: How to define clustering keys in Cassandra table

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now