Skip to site navigation (Press enter)

CQL: fails to COPY FROM with null values

Tobias Eriksson Mon, 19 Jun 2017 07:10:55 -0700

Hi
 I am trying to copy a file of CSV data into a table
But I get an error since sometimes one of the columns (which is a UUID) is empty
Is this a bug or what am I missing?

Here is how it looks like
Table
    id uuid,
    lastname text,
    firstname text,
    address_id uuid,
    dateofbirth timestamp,

PRIMARY KEY (id, lastname, firstname)

COPY playground.individual(id,lastname,firstname,address_id) FROM 
‘testfile.csv’;

Where the testfile.csv is like this

This works !!!
ce98d62a-3666-4d3a-ae2f-df315ad448aa,Jonsson,Malcom 
,c9dc8b60-d27f-430c-b960-782d854df3a5,2001-01-19 17:55:17+0000

This does NOT work !!!
ce98d62a-3666-4d3a-ae2f-df315ad448aa,Jonsson,Malcom , ,2001-01-19 17:55:17+0000

Cause then I get the following error
Failed to import 1 rows: ParseError - badly formed hexadecimal UUID string,  
given up without retries

So, how do I import my CSV file and set the columns which does not have a UUID 
to null ?

-Tobias
  • Previous message
  • View by thread
  • View by date
  • Next message
  • CQL: fails to COPY <table> FROM <filename>... Tobias Eriksson
    • Re: CQL: fails to COPY <table> FROM <fi... Stefania Alborghetti

Reply via email to

The Mail Archive
  • The Mail Archive home
  • user - all messages
  • user - about the list
  • Expand
  • Previous message
  • Next message
  • The Mail Archive home
  • Add your mailing list
  • FAQ
  • Support
  • Privacy
  • 63E405FC-F087-47A4-B6D1-DD4FAD02978C@qvantel.com