PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

igor.rmarinho_185445 avatar image
igor.rmarinho_185445 asked ·

Loading data with COPY FROM returns ParseError, "can't interpret '08' as a time"

On DSE 5.1.17 while loading data with COPY FROM in cqlsh, I am getting the following error:

$ cqlsh  with header=true AND CHUNKSIZE=100 AND NULL='null' " --connect-timeout 30
Reading options from the command line: {'header': 'true', 'null': 'null', 'chunksize': '1'}
Using 3 child process
Starting copy of shift_package_by_id_v2 with columns [company_id, bid_id, id, assignments, created_via_integration, display_name, external_id, original_ids, quantity, shifts, status].

<stdin>:1:Failed to import 1 rows: ParseError - Failed to parse [{day_of_week: 1, start_time_local: 08:30:00.000000000, duration: 'PT4H'}, {day_of_week: 2, start_time_local: 08:30:00.000000000, duration: 'PT4H'}, {day_of_week: 3, start_time_local: 08:30:00.000000000, duration: 'PT4H'}, {day_of_week: 4, start_time_local: 08:30:00.000000000, duration: 'PT4H'}, {day_of_week: 5, start_time_local: 08:30:00.000000000, duration: 'PT4H'}] : can't interpret '08' as a time,  given up without retries

It seems to be a bug, the first time I did the same COPY FROM and was ok now I getting this error.

The table schema is:

CREATE TABLE shift_package_by_id_v2 (
    company_id timeuuid,
    bid_id text,
    id text,
    assignments frozen<list<frozen<assignment>>>,
    created_via_integration boolean,
    display_name text,
    external_id text,
    original_ids frozen<list<text>>,
    quantity int,
    shifts frozen<list<frozen<shift>>>,
    status text,
    PRIMARY KEY ((company_id, bid_id), id)

Any thought?

cassandracopy
2 comments
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.

@igor.rmarinho_185445 Your table schema shows that you're using a user-defined type (UDT). Please post the definition of the shift UDT as well.

In addition, can you post a simplified schema and attach test CSV (1 or 2 rows is enough, not the whole data set) with steps to replicate the issue? Not looking for you to post your actual table schema, just a simplified one to make it easier to troubleshoot what's going on. Cheers!

1 Like 1 · ·

Hi Erick, I attached one row of the table as well



DESCRIBE TYPE shift;

shift (
    day_of_week int,
    start_time_local time,
    duration text
);


cqlsh shift_package_by_id_v2 to 'shift_package_by_id_v2.csv' 
with header=true" --request-timeout 60 --connect-timeout 30 


cqlsh -e "COPY shift_package_by_id_v2 from 'shift_package_by_id_v2.csv' 
with header=true"


Thank you!

datastax_forum.xls.zip

0 Likes 0 · ·

0 Answers