Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

yoo9189
2012-07-05 18:26:12

Hi, pedro, thanks for your reply,

Okay, in one sentence, using tFileOutputDelimited was the right component to use. Thank you

on a side note, just for reference, actually what I mainly doing is migrating (more accurately UPsert) table (through tMysqlInput -> tmap -> tOracleOutput) from MySQL to Oracle,

and I was thinking in order to check to make sure the same data is in there, what I was going to do was what is described above, getting the entries in table in MySQL to CSV and file compare with CSV from Oracle (through similar process).

And using tFileCompare does the job.

pedro
2012-07-04 04:56:38

Hi

Welcome to Talend Community!

First, I guess your requirement is to migrate data in mysql DB, right?
Why do you use tMysqlOutputBulk? You'd better use  tMysqlOutputBulkExec here.

Second,  all your questions are because  tMysqlOutputBulk doesn't generate a normal delimited file. The generated file is used for tMysqlBulkExec. If what you need is a delimited file, please use tFileOutputDelimited.

Regards,
Pedro

yoo9189
2012-07-03 23:08:34

Hi,

TOS DI 5.1.1

So I have a table in MySQL 5 with ~10 columns and some have null values

I have a simple job setup


tMysqlInput --> tMap --> tMysqlOutputBulk

(tMap here only does 1 to 1 mapping, so even without it it runs the same)

however my concern is that in Advanced setting of tMysqlOutputBulk, I cleared the check for

"Records contain NULL value" and according to the RG It says "If you clear the check box, the NULL values will automatically be replaced with empty values."

But when I look at the output file, it still has the "\N" value kept in it.

I was wondering why this was not replaced with empty value

additionally, in adv. settings

Row separator = "\n"
file separator = ","
escape char = "\"" (also tried with "\\" which made the result "\\N" instead of "\N")
Text enclosure = "\""

besides all should be pretty much default settings

2nd question is how does Text enclosure in mysqlOutputBulk work?

It looks like for a column if it has a entry like this

entry1"abcd"entry1

then in CSV file it turns out to be like this "entry1""abcd""entry1"

on contrary if I set similar setting (text enclosure) in tOracleOutputBulk, it would be what I expected "entry1"abcd"entry1"

is there any reason why they give different output?


Thanks

Board footer

Powered by FluxBB