Topic Need to give default values to a specific output file columns.

Admin IT started the topic:
2016-11-14 00:40

Need to give default values to a specific output file columns.

Hi Everyone.

My question looks simple, however after hours working this great tool, I didnt find a solution.
I already have a template file to be imported into a new system where will be filled with the data from MDB file after a cleanning & formatting process (address, phone, zip, email address...) But the template file (target) contains columns that the MDB file (source) dont have it.

Both are declared as DataStores (target and source)
The cols are necessary, like Customer = True, or Active= True; Almost are boolean values.

I didn´t find the way to create a VAR (boolean) to be asigned in the write process to a specific columns.

The only idea that I have right now is lunch another Job with the result file to be treated again.

Let me know if there is a way to do in the same Job an autofilled of those columns.

Thanks in advance,
Dennis replied:
2016-11-14 08:08
Hi there,

You should be able to use the Fuse/Coalesce transformer combined with a simple JavaScript transformer for that.

The JavaScript transformer isn't actually doing much scripting, it's just returning the string you want, so even with zero JavaScript knowledge it is easy to set up. One quirk is that it must be connected to an input column to work, it doesn't matter which one (the value isn't used for anything).

I've uploaded an example job here: coalesce.analysis.xml

... The JavaScript component shouldn't actually have been necessary, instead something like a Convert to string component with a value based column inside should have been enough, but the Fuse/Coalesce component doesn't seem to want to accept the value. I'll look into that.

Best regards,
You are not signed in.
You need to be signed in to participate in the discussion.