You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rahul Bhardwaj <ra...@indiamart.com> on 2015/03/24 11:30:01 UTC

error in bulk loading

Hi all,

I need to import a csv file to a table using copy command, but file
contains carriage returns which causing me problem in doing so, Is there
any way in cassandra to solve this



Regards:
Rahul

-- 

Follow IndiaMART.com <http://www.indiamart.com> for latest updates on this 
and more: <https://plus.google.com/+indiamart> 
<https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART> Mobile 
Channel: 
<https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8> 
<https://play.google.com/store/apps/details?id=com.indiamart.m> 
<http://m.indiamart.com/>
<https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2>
Watch how IndiaMART Maximiser helped Mr. Khanna expand his business. kyunki Kaam 
Yahin Banta Hai 
<https://www.youtube.com/watch?v=Q9fZ5ILY3w8&feature=youtu.be>!!!

RE: error in bulk loading

Posted by "Caraballo, Rafael" <ra...@twcable.com>.
Not sure if this will help, but I have had issues with windows file in Unix before and this has worked for me…

To remove the ^M characters at the end of all lines in vi, use:

:%s/^V^M//g

The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like this:

:%s/^M//g

Rafael

From: Tyler Hobbs [mailto:tyler@datastax.com]
Sent: Tuesday, March 24, 2015 5:55 PM
To: user@cassandra.apache.org
Subject: Re: error in bulk loading


On Tue, Mar 24, 2015 at 5:30 AM, Rahul Bhardwaj <ra...@indiamart.com>> wrote:
I need to import a csv file to a table using copy command, but file contains carriage returns which causing me problem in doing so, Is there any way in cassandra to solve this

You can surround the field with double-quotes to handle this (or change the quote character with the QUOTE option for COPY).

--
Tyler Hobbs
DataStax<http://datastax.com/>

________________________________
This E-mail and any of its attachments may contain Time Warner Cable proprietary information, which is privileged, confidential, or subject to copyright belonging to Time Warner Cable. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout.

Re: error in bulk loading

Posted by Tyler Hobbs <ty...@datastax.com>.
On Tue, Mar 24, 2015 at 5:30 AM, Rahul Bhardwaj <
rahul.bhardwaj@indiamart.com> wrote:

> I need to import a csv file to a table using copy command, but file
> contains carriage returns which causing me problem in doing so, Is there
> any way in cassandra to solve this


You can surround the field with double-quotes to handle this (or change the
quote character with the QUOTE option for COPY).

-- 
Tyler Hobbs
DataStax <http://datastax.com/>