Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

loading twitter data into oracle

RocioPerezNunez-OracleDec 8 2017 — edited Dec 9 2017

Hello all,

I have some problems loading a twitter data from a csv, with some multiline records. I have 4 columns id_tweet,text,created_at, username .

When text is enclosed by “  the register is multiline or has comas inside, I show you 3 examples, 1st enclosed by “ with comas inside the text, 2nd enclosed by “ and multiline, 3rd no enclosed by coma no multiline:

793418980342063104,"@realDonaldTrump I am also a $ donor, i can not give much in the way of $ but i do.(poor) My advice is more valuable if you have used it.",2016-11-01T11:46:40.000Z, ReynardGosso

793418981415583745,"@FranklinFoer                                                                                                                                                                                                                                                                                                                                                                                   

Thanks @realDonaldTrump you’re doing a great Job helping to elect @HillaryClinton !                                                                                                                                                                                                                                                                                                                                                                                        

https://t.co/q9qO0uKZxA",2016-11-01T11:46:40.000Z,759714473556840448,false,wabroussard1,,,0,-1,1,0                                                                                                                                                                                                                             

793418985458929664,This is the 5 year old Nazi German-American @realDonaldTrump that wants 2 be president. No  Americans elect adults. https://t.co/IFdQkdDyJN,2016-11-01T11:46:41.000Z, AnthonyNnani      

I´m using sqlldr but when I use

load data

infile 'tweetv1.csv' "str '\r\n'"

append continueif last != ','

into table TWEETS

fields terminated by ','

OPTIONALLY ENCLOSED BY '"' AND '"'

trailing nullcols

           ( id_TWEET CHAR(4000),

             text CHAR(4000),

             created_at CHAR(4000),

             userid CHAR(4000)

           )

It doesn´t recognize when it’s a new logical record.

Any advice on how to do it?

Thanks a lot,

Rocio

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2018
Added on Dec 8 2017
2 comments
440 views