• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Few Question about tMysqlOutputBulk

#1 2012-07-03 23:08:34

yoo9189
New member
Registered: 2012-06-21
Posts: 5

Few Question about tMysqlOutputBulk

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

Last edited by yoo9189 (2012-07-04 00:23:23)

Offline

#2 2012-07-04 04:56:38

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Few Question about tMysqlOutputBulk

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


Only Paranoid Survive.

Offline

#3 2012-07-05 18:26:12

yoo9189
New member
Registered: 2012-06-21
Posts: 5

Re: Few Question about tMysqlOutputBulk

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.

Last edited by yoo9189 (2012-07-05 22:31:48)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Few Question about tMysqlOutputBulk

Board footer

Powered by FluxBB