They don't look similar in DB. correctFile.csv multiline record first record seperated in 3 lines in DB also and that's the expected behaviour I guess.Liutauras Vilda wrote:Who told you that? This is only how the raw file looks like, after insertion, it gets inserted in the DB and treated as 1 record, regardless if you have it on 3 different lines or you'd have on 1 line
Load file with lines 2, 3 and 4 as one liner ending with CRLF and you'll see it goes through and in DB looking exactly the same.
How can I inter change LF and CRLF?Liutauras Vilda wrote:So, keep original file untouched after it gets downloaded and make copy of it, but fixed one. That fixing part needs to be happening upon file writing (as you don't want to fix them manually)
Dave Tolls wrote:For the one that fails it has picked up LF as the terminator, so all lines are being treated as new records.
Tried this also, but I guess \n is not allowed in this parameter. I got the following error:Dave Tolls wrote:If so, how about trying CR ('\r') as the CONTINUEIF LAST instaed of the double quotes?
Don't guess. Find the details for the program and read them. Such an error message would probably exclude any line end characters from a CONTINUEIF marker since they all count as whitespace. You may have an insoluble problem that the SQL loader doesn't permit multi‑line Strings. I don't know how you are going to get those line end sequences in. You can try changing a solitary LF to \\n, but there is no warranty and it may not work.Puspender Tanwar wrote:. . . I guess \n is not allowed in this parameter. I got the following error:
SQL*Loader-458: Comparison text ('
') of CONTINUEIF LAST must be non-whitespace
Dave Tolls wrote:How about '"\r'?
Dave Tolls wrote:Since you have a version with the correct CRLF terminator, I assume that came from the API somehow.
Puspender Tanwar wrote:multiline record first record seperated in 3 lines in DB also and that's the expected behaviour I guess.
The file which loaded contains CRLF at complete ending of record.
Liutauras Vilda wrote:
Puspender Tanwar wrote:multiline record first record seperated in 3 lines in DB also and that's the expected behaviour I guess.
Really?!?
Dave Tolls wrote:Whoever entered the original data, which will be somewhere in Salesforce, put new lines in one of the fields. That ought to be reflected in the transfer.
Id | IsDeleted | CaseNumber | Description |
---|---|---|---|
5002800000MMzJUAA1 | false | 00001000 | Per customer-"The client is now thinking of buying vs remodeling - I'll keep you posted!" |
Puspender Tanwar wrote:I used the SOAP UI and the data returned is in multiline:
Actually problem is not the double quote only, the problem is the combination of double quote and newline.Liutauras Vilda wrote:Yeah. All trouble for you comes because of the quoted sentence, so it messes up loader.
Sorry Liutauras, but what does that mean ?don't you want to make that data dummy looking?
Dave Tolls wrote:So if that's what comes from the API call, then there must be something in your code that translates XML to a CSV.
Liutauras Vilda wrote:don't you want to make that data dummy looking?
Puspender Tanwar wrote:Sorry Liutauras, but what does that mean ?
Liutauras Vilda wrote:For the future, be careful exposing actual data. That may be sensitive and somebody can sue you, because of exposing it publicly.
Puspender Tanwar wrote:Actually that data is dummy only, I entered that in my salesforce account just for test purpose.
Liutauras Vilda wrote:Here we go, new info, did you actually enter description as:
Trying to understand how that API works and what it gives you as streamed data.
Puspender Tanwar wrote:Why only first and third rows are enclosed with " , why not the second line too. This is something weird.
Dave Tolls wrote:For me?
Talk to Salesforce.
As I said earlier, they must have encountered something like this before.
I'm going to be a "small government" candidate. I'll be the government. Just me. No one else.
Looky! I'm being abducted by space aliens! Me and this tiny ad!
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|