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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Insert data from delimited file to Cassandra.

Hi,
I want to insert data from delimited file to Cassandra composite column Family using tCassandraRow.
First record is getting inserted successfully into column Family. But other records are not getting inserted.
So, how to insert all record from delimited file to Cassandra column Family.
We have to perform below activities on Cassandra:
1. Insert all data into composite Column Family from delimited file using tCassandraRow.
2. Insert data into collection columns like SET, LIST & MAP.

Regards
Rahul.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,
You should use a tjavarow to put your global variable.
Please have a look at my screenshots for details
Best regards
Sabrina
0683p000009MEOT.png 0683p000009MEQY.png 0683p000009MEQd.png 0683p000009ME6B.png

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Hi,
You should use a tjavarow to put your global variable.
Please have a look at my screenshots for details
Best regards
Sabrina
0683p000009MEOT.png 0683p000009MEQY.png 0683p000009MEQd.png 0683p000009ME6B.png
Anonymous
Not applicable
Author

Hi Rahul,
Is there any update for your issue?
Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks Sabrina, Now its working.
Anonymous
Not applicable
Author

Hi rahul.nawale,
Thanks for your feedback. Don't hesitate to post your issue on forum
Best regards
Sabrina
Anonymous
Not applicable
Author

Dear Administrator,

I have two questions:
How can I read from a cassandra table using a composite key using tcassandrainput?
Rows I am receiving are coming out as NULL even though they are integers... I think schema is not correctly setup... what is the DBType of int @ Cassandra?

Thanks.
Anonymous
Not applicable
Author

Hi,
How can I read from a cassandra table using a composite key using tcassandrainput?

Could you give us more description about your composite key?
Rows I am receiving are coming out as NULL even though they are integers... I think schema is not correctly setup... what is the DBType of int @ Cassandra?

You can go to Window-->Preference-->Specific Setting-->Metadata of Talend to check mapping file.
Best regards
Sabrina
0683p000009MEQi.png
Anonymous
Not applicable
Author

Hi Sabrina,
I am new to talend,I had a query.
You adviced to use tjavarow.
Is this applicable to composite Column Family also or only Insert data into collection columns.
If no,then could you suggest one.
Thanks and Regards,
Ojasvi Gambhir
Anonymous
Not applicable
Author

Hi Ojasvi Gambhir,
Could you please describe your requirement better? What's your meaning of composite Column Family? 
Could you please elaborate your case with an example with input and expected output values?

Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Appreciate your quick response.
My requirement is to insert data from hive/delimited file into cassandra columnfamily which has 3 columns as composite primary key. 
 
For example:
Source Data from hive/file as five columns namely
Column1,Column2,Column3,Column4,Column5.
I want to Upsert these columns into cassandra where three columns constitute as primary key.
CQL for cassandra columnfamily looks like this:
 CREATE TABLE hivetoCasdra (
Column1 text,
Column2 text,
Column3 text,
Column4 text,
Column5 text,
PRIMARY KEY(Column1,Column2,Column3));
I used tCassandraOutput component but its failing with :
Exception in component tCassandraOutput_1
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Not enough bytes to read value of component 0)
Because of which searching for an alternate solution.
Kindly let me know in case you need further details.
Thanks and Regards,
Ojasvi Gambhir