Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

gxeon2019_190087 avatar image
gxeon2019_190087 asked Erick Ramirez edited

How do I load CSV data with DSBulk?

Hi Team

Need help for loading mongodb collections which are in Csv format. while trying to execute dsbulk command as below , getting below errors

1609069981771.png

Please help to know how can we load a .csv file to cassandra database ? what are the basic steps for loading mongo data to cassandra ?

Is there any other tools available other than dsbulk ?

kindly help!

-Thanks

Gaurav

dsbulk
1609069981771.png (28.3 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez edited

It looks like you haven't looked at the documentation or command line help for the DataStax Bulk Loader (DSBulk). The -f flag is for specifying the load options in a configuration file instead of the command line. It isn't for specifying the input data.

The correct format for loading CSV data to a cluster is:

$ dsbulk load \
    -url /path/to/input.csv \
    -h 'cluster_ip1,cluster_ip2' \
    -k keyspace_name -t table_name

There are several loading examples in the DSBulk docs to help you get started quickly.

If you're interested, we've got lots of resources here:

For what it's worth, I'm on holidays and have limited mobile access so my responses are delayed. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.