cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Thompson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7639) Cqlsh cannot use .csv files with Windows style line endings
Date Tue, 12 Aug 2014 16:17:12 GMT

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

Philip Thompson commented on CASSANDRA-7639:
--------------------------------------------

It appears this is exclusively csv files generated by Excel. Reproduction steps:
{code}
CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
1};
use test;
create table t (key text PRIMARY KEY, v text);
COPY t FROM '7639-repro.txt';
{code}

> Cqlsh cannot use .csv files with Windows style line endings
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-7639
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7639
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Mac OSX and Windows 7
>            Reporter: Philip Thompson
>            Assignee: Joshua McKenzie
>              Labels: windows
>             Fix For: 1.2.19, 2.0.10, 2.1.1
>
>         Attachments: 7639-repro.csv
>
>
> When performing COPY table FROM 'test.csv' on cqlsh across any of the three major branches
(1.2, 2.0, 2.1), the following error is thrown:
> {code}new-line character seen in unquoted field - do you need to open the file in universal-newline
mode?{code}
> This happens if the .csv file has windows style line endings, such as if it was created
by saving a .csv from excel. This reproduces in both unix and windows environments. This is
a simple enough fix. I found that running dos2unix on csv files generated by excel was not
sufficient to correct the issue.



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

Mime
View raw message