From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

How to populate a column as blank in outputfile

Highlighted
Six Stars

How to populate a column as blank in outputfile

Hi,

 

I have column called 'description' but I want this column to be populated as blank in the output file. How should I do it..?


Accepted Solutions
Highlighted
Moderator

Re: How to populate a column as blank in outputfile

@KanT,if you do not give Expression of Out section in tmap,will populate as blank.

 

please find the bleow screenshoot.Untitled.png

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post


All Replies
Highlighted
Moderator

Re: How to populate a column as blank in outputfile

Hello,

You can try to replace your column with"" by using replaceAll(old char, new char) in tMap.

Let us know if it works for you.

Best regards

Sabrina

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Moderator

Re: How to populate a column as blank in outputfile

@KanT,if you do not give Expression of Out section in tmap,will populate as blank.

 

please find the bleow screenshoot.Untitled.png

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post

Highlighted
Six Stars

Re: How to populate a column as blank in outputfile

Hi Manodwhb,

 

One more thing, if I want to set the default value of the certain column to 1. Should I make the change in the input file by defining the default value as "1".

I tried couple of combinations by making it as 1, or "1", change the field type to String. But nothing works.

 

How do I set value to 1..?

 

 

12.png

 

 

Highlighted
Moderator

Re: How to populate a column as blank in outputfile

@KanT,you can use below link to set the default values in tfileinputdelimited.

 

 

https://help.talend.com/reader/mhqCkTBnin7IXmJBUJoocQ/~H7aem4LpI~B45e74SJN1w

 

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Six Stars

Re: How to populate a column as blank in outputfile

Thanks for the link. I did look this link before. It talks about setting default values for string. But if u want to default integer values, it doesn't work this way.

Highlighted
Moderator

Re: How to populate a column as blank in outputfile

Otherway you can try in tmap that expression somting like

 

row1.fieldname== null ? 1 : row1.fieldname

Manohar B
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog