skip to Main Content

I am not able to push my csv file which is in blob storage to Azure Cosmos DB for Apache Cassandra

I haven’t tried anything yet, I am not able to find any proper material

2

Answers


  1. The CQL blob type is designed for storing small images or a short string since our general recommendation is to limit the blob size to less than 1MB.

    For this reason we don’t recommend that you store files in Cassandra. Instead, continue using the blob storage and only save the metadata such as the blob URL in Cassandra. Cheers!

    Login or Signup to reply.
  2. To load data from a CSV file into Cassandra, you have two options. There’s DSBulk or the cqlsh COPY command.

    From within cqlsh:

    > COPY stackoverflow.nerd_holidays (year_bucket, event_date, id, name)
      FROM 'nerd_holidays.csv' WITH DELIMITER = '|' AND HEADER = TRUE;
    

    You can download DSBulk from here: https://downloads.datastax.com/#bulk-loader

    dsbulk load -url nerd_holidays.csv -k stackoverflow -t nerd_holidays -header true
                -m 'year_bucket=year_bucket, event_date=event_date, id=id, name=name'
    

    Either one should work, but with an 8GB file, I’d kind of lean toward DSBulk.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search