Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
BA621858188
Creator
Creator

Regarding Column name with space load from DB to file

Hi All,

I wanted to know the resolution. I have database as source where my column name is employee_id but in my target I want column name as employee id (Space).

Could you please help

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

@Vrushabh Malbari​, because talend does not allow you to contain space in the column name, so use a tfixedFlowInput to write only one row (all column names) to the file in the first subjob.

tFixedFlowInput--main--tFIleOutputDelimited1

|onsubjobok

tMssqlInput--main-tFileOutputDelimited2

 

tFileOutputDelimited2: append the data to the same file, uncheck the 'include headers' box.

0695b00000Rjf2VAAR.pngHope it is helpful.

 

Regards

Shong

View solution in original post

5 Replies
Anonymous
Not applicable

Hi

If you want to output the column name in the target file, use a tFixedFlowInput to define the column names and write them to the file in the first subjob. In next subjob, append the data to the same file.

 

Regards

Shong

BA621858188
Creator
Creator
Author

Could you give more details with rough job design. My source is sql database and target is file. and In the target file before header I want current date.

 

Target file Output

currentdate

column headers

data of file

Anonymous
Not applicable

@Vrushabh Malbari​, because talend does not allow you to contain space in the column name, so use a tfixedFlowInput to write only one row (all column names) to the file in the first subjob.

tFixedFlowInput--main--tFIleOutputDelimited1

|onsubjobok

tMssqlInput--main-tFileOutputDelimited2

 

tFileOutputDelimited2: append the data to the same file, uncheck the 'include headers' box.

0695b00000Rjf2VAAR.pngHope it is helpful.

 

Regards

Shong

BA621858188
Creator
Creator
Author

Its working now for Headers. But I have one more requirement to include current_date before headers. So for that, Do I need to add one more tfixedflowinput subjob?

 

Also do you have any job design for incremental load ( source is DB and target is file)

 

Thank you

Anonymous
Not applicable

@Vrushabh Malbari​ yes, use another tfixedFlowInput to write the current date to the file in the begin of job.