One Star

[resolved] tFilter Row empty date values

Hi all,
I'm trying to read datasets from an excel sheet that contains datasets with an empty date value and put into a MS SQL database table.
The receiving database doesn't allow blank or null values so I'm trying to filter them using the tFilterRow component. Surely I can manually add fake date values to satisfy the MS SQL database, however I would like to run the job automaticall and it's impossible to modify the Excel input sheet itself (created by a 3rd party database tool).
I'd be grateful if somebody has an easy solution.
Cheers,
Nils
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: [resolved] tFilter Row empty date values

Hi magdmartin
From your error code information, did you set the condition
"row2.eff_date != null"

in tMap Expression? It should be set in filter expression.
Please refer to component reference tMap
In addition, could you give us more job information? It will be helpful for us giving a hand to 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.
6 REPLIES
One Star mpa
One Star

Re: [resolved] tFilter Row empty date values

N1866,
Add a tMap component between your tInputExcel and your tMssqlOutput.
In the tMap just do a 1:1 mapping and add an expression in the output box by saying "row1.YourDateFieldName is not null".
Regards
One Star mpa
One Star

Re: [resolved] tFilter Row empty date values

N1866,
Ah no sorry I was wrong, it needs to be : "row1.YourDateFieldName != null"
Was mixing the expression up with SQL and SSIS. :-)
Regards
Five Stars

Re: [resolved] tFilter Row empty date values

"row2.eff_date != null" returns the following error: Type mismatch: cannot convert from boolean to Date
Never in my process row2.eff_date is defined as a boolean.
Moderator

Re: [resolved] tFilter Row empty date values

Hi magdmartin
From your error code information, did you set the condition
"row2.eff_date != null"

in tMap Expression? It should be set in filter expression.
Please refer to component reference tMap
In addition, could you give us more job information? It will be helpful for us giving a hand to 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.
Five Stars

Re: [resolved] tFilter Row empty date values

Thanks xdshi for the answer (and sorry for the long silence). It did works and I am using this expression on a regular basis now.
Moderator

Re: [resolved] tFilter Row empty date values

Hi magdmartin,
It is a good news for us, thanks for your feedback.
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.