cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shiti Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6773) Delimiter not working for special characters in COPY command from CQLSH
Date Mon, 10 Mar 2014 05:15:47 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13925456#comment-13925456
] 

Shiti Saxena commented on CASSANDRA-6773:
-----------------------------------------

Hi [~mishail],

I assumed that one would use double "\" when they had to specify backslash as a value since
its escape character.
{code}
cqlsh:test> COPY ttable TO 'test.csv' WITH ESCAPE = '\\';
{code}

Is this wrong? Should we handle cases where user sets the value using a single "\" or throw
an error?
If this should be handled internally, are there any other cases we need to handle? 

> Delimiter not working for special characters in COPY command from CQLSH
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-6773
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6773
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Shiti Saxena
>            Assignee: Shiti Saxena
>            Priority: Trivial
>              Labels: CQL, CQL3
>         Attachments: trunk-6773.txt
>
>
> COPY command from CQLSH which can be used to load data from CSV files is not working
with option delimiter='\t'
> cqlsh>CREATE TABLE airplanes (
> name text PRIMARY KEY,
> manufacturer ascii,
> year int,
> mach float
> );
> cqlsh>INSERT INTO airplanes   (name, manufacturer, year, mach)   VALUES ('P38-Lightning',
'Lockheed', 1937, 7);
> cqlsh> SELECT * FROM airplanes;   
> name          | mach | manufacturer | year 
> --------------+------+--------------+------  
> P38-Lightning |  0.7 |     Lockheed | 1937
> cqlsh> COPY airplanes (name, manufacturer, year, mach) TO 'temp.tsv' WITH DELIMITER
= '\t';
> "delimiter" must be an 1-character string
> cqlsh> COPY airplanes (name, manufacturer, year, mach) FROM 'temp.csv' WITH DELIMITER
= '\t';
> "delimiter" must be an 1-character string



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message