reject null records in tmap

One Star

reject null records in tmap

Hi Guys,
I want to implement a logic that if my NAME column in my input column comes null then my whole record should be rejected.I am trying this in tmap but it is not working with the key & unchecking the nullable checkbox.Please reply asap.
Regards,
Nikk
One Star

Re: reject null records in tmap

Hi Nikk,
You just have to create a new output and add a filter on your tMap.
For example : add a reject output and add a filter (green arrow on the right).
Put this kind of syntax : row1.NAME == null
You have to create an other filter (or a reject filter) to delete all unvailable rows (all nullable lines).
And that's all
One Star

Re: reject null records in tmap

Hi,
This doesn't seem to work.I am still getting null values in my output file.Please give me a solution.Is there any way that we can reject rows with all null values.
Thanks,
Nikk
One Star

Re: reject null records in tmap

in the expression filter for your output map have the rule
! Relational.ISNULL(inputcolumn.NAME)
This will reject all records with a null NAME
One Star mpa
One Star

Re: reject null records in tmap

Use the expression filter for your output table aswell and use: row1.NAME != null
It's the same as janhess said I guess
One Star

Re: reject null records in tmap

Hi Guys,
This is not working.I am fetching my input for a DB via sql query.
toracleinput -- tmap -- tfileoutputdelimited.
I want to reject some rows which have NAME as null value coming in the query.
Please reply asap.
Regards,
Nikk
One Star

Re: reject null records in tmap

Is the returned value actually null or empty. If it is empty use the rule ! inputcolumn.NAME.equals("")