Creating and inserting a Map into Cassandra

Highlighted
Five Stars

Creating and inserting a Map into Cassandra

Hello,

 

I have the following issue when importing MsSQLServer data into Cassandra:

I need to import several MsSQLServer tables with varying number of fields into a single Cassandra Table with a 'Map' data type field. I'm having trouble combining, for instance, 5 fields of a schema into one object and inserting into the map in Cassandra. 

 

My current approach was trying to use literal statements with bound variables (e.g "Insert into xx (id,map) values ('whatever', {'nonsense': ?});"), but that does not work, and the following error message pops up

   - "Invalid map literal for sensors: bind variables are not supported inside collection literals"

 

Is the correct approach create a Java Object for each of the different MsSQLServer tables and then inserting it as follows: 

   - "Insert into xx (id, map) values (?,?);"

 

And if so, how would I be able to do this?

 

I would really appreciate some help.

Five Stars

Re: Creating and inserting a Map into Cassandra

Bump

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch