error in bulk loading

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error in bulk loading

Rahul Bhardwaj
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 for latest updates on this and more: Mobile Channel:

Watch how IndiaMART Maximiser helped Mr. Khanna expand his business. kyunki Kaam Yahin Banta Hai!!!
Reply | Threaded
Open this post in threaded view
|

Re: error in bulk loading

Tyler Hobbs-2

On Tue, Mar 24, 2015 at 5:30 AM, Rahul Bhardwaj <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

RE: error in bulk loading

Caraballo, Rafael

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:[hidden email]]
Sent: Tuesday, March 24, 2015 5:55 PM
To: [hidden email]
Subject: Re: error in bulk loading

 

 

On Tue, Mar 24, 2015 at 5:30 AM, Rahul Bhardwaj <[hidden email]> 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



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.