Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1B56DBBB for ; Tue, 6 Nov 2012 20:08:14 +0000 (UTC) Received: (qmail 87935 invoked by uid 500); 6 Nov 2012 20:08:13 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 87898 invoked by uid 500); 6 Nov 2012 20:08:13 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 87844 invoked by uid 99); 6 Nov 2012 20:08:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 20:08:13 +0000 Date: Tue, 6 Nov 2012 20:08:13 +0000 (UTC) From: "J.B. Langston (JIRA)" To: commits@cassandra.apache.org Message-ID: <858351099.76314.1352232493854.JavaMail.jiratomcat@arcas> In-Reply-To: <860076497.76313.1352232493748.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (CASSANDRA-4923) cqlsh COPY FROM command requires primary key in first column of CSV MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] J.B. Langston updated CASSANDRA-4923: ------------------------------------- Description: The cqlsh COPY FROM command requires the primary key to be in the first column of the CSV, even if the field list shows that the primary key is in a different position. Test data available from ftp://ftp.census.gov/Econ2001_And_Earlier/CBP_CSV/cbp01us.txt CREATE TABLE cbp01us ( naics text PRIMARY KEY ) WITH comment='' AND comparator=text AND read_repair_chance=0.100000 AND gc_grace_seconds=864000 AND default_validation=text AND min_compaction_threshold=4 AND max_compaction_threshold=32 AND replicate_on_write='true' AND compaction_strategy_class='SizeTieredCompactionStrategy' AND compression_parameters:sstable_compression='SnappyCompressor'; copy cbp01us (uscode,naics,empflag,emp,qp1,ap,est,f1_4,e1_4,q1_4,a1_4,n1_4,f5_9,e5_9,q5_9,a5_9,n5_9,f10_19,e10_19,q10_19,a10_19,n10_19,f20_49,e20_49,q20_49,a20_49,n20_49,f50_99,e50_99,q50_99,a50_99,n50_99,f100_249,e100_249,q100_249,a100_249,n100_249,f250_499,e250_499,q250_499,a250_499,n250_499,f500_999,e500_999,q500_999,a500_999,n500_999,f1000,e1000,q1000,a1000,n1000) from 'cbp01us.txt' with header=true; Bad Request: Expected key 'NAICS' to be present in WHERE clause for 'cbp01us' Aborting import at record #0 (line 1). Previously-inserted values still present. was: The cqlsh COPY FROM command requires the primary key to be in the first column of the CSV, even if the field list shows that the primary key is in a different position. CREATE TABLE cbp01us ( naics text PRIMARY KEY ) WITH comment='' AND comparator=text AND read_repair_chance=0.100000 AND gc_grace_seconds=864000 AND default_validation=text AND min_compaction_threshold=4 AND max_compaction_threshold=32 AND replicate_on_write='true' AND compaction_strategy_class='SizeTieredCompactionStrategy' AND compression_parameters:sstable_compression='SnappyCompressor'; copy cbp01us (uscode,naics,empflag,emp,qp1,ap,est,f1_4,e1_4,q1_4,a1_4,n1_4,f5_9,e5_9,q5_9,a5_9,n5_9,f10_19,e10_19,q10_19,a10_19,n10_19,f20_49,e20_49,q20_49,a20_49,n20_49,f50_99,e50_99,q50_99,a50_99,n50_99,f100_249,e100_249,q100_249,a100_249,n100_249,f250_499,e250_499,q250_499,a250_499,n250_499,f500_999,e500_999,q500_999,a500_999,n500_999,f1000,e1000,q1000,a1000,n1000) from 'cbp01us.txt' with header=true; Bad Request: Expected key 'NAICS' to be present in WHERE clause for 'cbp01us' Aborting import at record #0 (line 1). Previously-inserted values still present. > cqlsh COPY FROM command requires primary key in first column of CSV > ------------------------------------------------------------------- > > Key: CASSANDRA-4923 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4923 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 1.1.5, 1.2.0 beta 1 > Reporter: J.B. Langston > Labels: cqlsh > > The cqlsh COPY FROM command requires the primary key to be in the first column of the CSV, even if the field list shows that the primary key is in a different position. > Test data available from ftp://ftp.census.gov/Econ2001_And_Earlier/CBP_CSV/cbp01us.txt > CREATE TABLE cbp01us ( > naics text PRIMARY KEY > ) WITH > comment='' AND > comparator=text AND > read_repair_chance=0.100000 AND > gc_grace_seconds=864000 AND > default_validation=text AND > min_compaction_threshold=4 AND > max_compaction_threshold=32 AND > replicate_on_write='true' AND > compaction_strategy_class='SizeTieredCompactionStrategy' AND > compression_parameters:sstable_compression='SnappyCompressor'; > copy cbp01us (uscode,naics,empflag,emp,qp1,ap,est,f1_4,e1_4,q1_4,a1_4,n1_4,f5_9,e5_9,q5_9,a5_9,n5_9,f10_19,e10_19,q10_19,a10_19,n10_19,f20_49,e20_49,q20_49,a20_49,n20_49,f50_99,e50_99,q50_99,a50_99,n50_99,f100_249,e100_249,q100_249,a100_249,n100_249,f250_499,e250_499,q250_499,a250_499,n250_499,f500_999,e500_999,q500_999,a500_999,n500_999,f1000,e1000,q1000,a1000,n1000) from 'cbp01us.txt' with header=true; > Bad Request: Expected key 'NAICS' to be present in WHERE clause for 'cbp01us' > Aborting import at record #0 (line 1). Previously-inserted values still present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira