Hi, I've made a join into a tmap. - table #1: pid, data1 - table #2: pid, cid I'm doing database INSERT : pid( found into #1) + cid (found into #2). But data are incomplete. If i don't have a cid, i've to use a default value as cid. How can i do ? Thanks for help.
If your tMap does a Left Join, then the field cid will be null if there is no match. You can convert that null into some other value by using this expression in the output field:
row1.cid == null ? "no cid" : row1.cid
(Instead of row1, use the actual name of the input connection.)
Hope this helps.
If your tMap does a Left Join, then the field cid will be null if there is no match. You can convert that null into some other value by using this expression in the output field:
row1.cid == null ? "no cid" : row1.cid
(Instead of row1, use the actual name of the input connection.)
Hope this helps.
Hi, I have a different situation now for the same question above. I have to compare input values for null and if it is null then I have to load the default value (specified while creating tables) in that column, otherwise source data. So, the question is - if I don't add the column in the output schema then how can I load the data coming from the source.
Use a tMap to send the incoming data to two different outputs (one with the column and one without) based on whether the incoming value is null or not.