Neophytos Demetriou created CASSANDRA-15184:
-----------------------------------------------

             Summary: Milliseconds are lost when importing with COPY FRΟΜ and 
an alternative DATATIMEFORMAT
                 Key: CASSANDRA-15184
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15184
             Project: Cassandra
          Issue Type: Bug
          Components: Legacy/Tools
            Reporter: Neophytos Demetriou
         Attachments: temptable.csv, temptable2.csv

With a table created as follows:

 
{code:java}
CREATE TABLE rc.temptable(id bigint, recorded_on timestamp, primary 
key(id));{code}
 

The following does not work - milliseconds are lost - temptable2.csv is 
attached:

 
{code:java}
COPY rc.temptable(id,recorded_on) FROM 'temptable2.csv' WITH ERRFILE = 
'temptable.err' AND HEADER = TRUE AND BOOLSTYLE = '1,0' AND DATETIMEFORMAT = 
'%Y-%m-%dT%H:%M:%S.%fZ'{code}
 

We have tried with various files/formats and, in essence, we are forced to use 
the default cassandra format or milliseconds are lost. For instance, using 
temptable.csv (attached) and the following command (no cqlshrc and no 
CQLSH_DEFAULT_TIMESTAMP_FORMAT is defined) works fine:
{code:java}
COPY rc.temptable(id,recorded_on) FROM 'temptable.csv' WITH ERRFILE = 
'temptable.err' AND HEADER = TRUE AND BOOLSTYLE = '1,0'{code}
This is with: cqlsh 5.0.1, Cassandra 3.11.4, CQL spec 3.4.4, Native protocol v4.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to