Home » RDBMS Server » Server Utilities » loading data from twitter with sqlldr (sqlloader )
loading data from twitter with sqlldr [message #667129] Fri, 08 December 2017 12:18 Go to previous message
rocioperezn
Messages: 2
Registered: December 2017
Junior Member
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 !
",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.,2016-11-01T11:46:41.000Z, AnthonyNnani

I´m using sqldr 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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: oracle impdp command issue
Next Topic: ORA-00984: column not allowed here. date. sql loader.
Goto Forum:
  


Current Time: Thu Mar 28 16:43:18 CDT 2024