Search code examples
mysqlcassandradatabase-migrationsqoop

cassandra sqoop import auto generate timeuuid


I want to migrate my MySQL data to cassandra. I'am using old version of DSE i.e. 4.8 which supports the sqoop command. My query is that i want to insert row with dynamic timeuuid column value which is to be generated at the time of insertion and it is not present in MySQL table. Please help.

I'am using following query which inserts the data but without uuid column value.

bin/dse sqoop cql-import --connect jdbc:mysql://localhost:3306/testing --table tbl1 --username root -P --cassandra-keyspace test --cassandra-table testtable --cassandra-host localhost --split-by ID --cassandra-column-mapping id:ID,name:NAME --columns ID,NAME

Thanks,


Solution

  • I did lot of searching and found that sqoop can only be used to insert data exactly in the database. So, if you want to manipulate data at the time of insertion, you need to create some custom application or ETL tool can help you. However, I was running out of time so achieved by creating Java application. Hence, I'm closing this issue. Thanks for your help people on this matter.

    Regards,

    Aditya Jain