Hi All,
I'm facing a weird sort of an issue. I have an attribute that carries a NULL value. When I try to perform logical operations using IsNull(variable), the transformer doesn't seem to be able to recognize it as a null. However, when I do a Seq(variable) to check the actual value, I get a 0 which is the ASCII for NULL. Trying to perform these operations within a stage variable
Anyone else who has experienced this?
Null Handling Issue In Transformer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
Null Handling Issue In Transformer
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Hi Jerome,
Are you adding any operators with IsNull Clause ie. IsNull(SourceColumn1) And Len(Trim(SourceColumn1))=0, If yes then try to split it out like below in Stage Variable.
Thanks & Regards
Koti
Are you adding any operators with IsNull Clause ie. IsNull(SourceColumn1) And Len(Trim(SourceColumn1))=0, If yes then try to split it out like below in Stage Variable.
Code: Select all
If IsNull(SourceColumn1) Then "Do Something" Else (If Len(Trim(SourceColumn1))=0 Then "Do Something" Else "Something Else")
Koti
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
Found the issue.
The value was not technically a NULL for DataStage. It was a string of length 0 which Oracle treats as a NULL but not DataStage.
Seq(Variable)= 0 does not represent a NULL
Seq(Variable)=NULL represents a NULL
The value was not technically a NULL for DataStage. It was a string of length 0 which Oracle treats as a NULL but not DataStage.
Seq(Variable)= 0 does not represent a NULL
Seq(Variable)=NULL represents a NULL
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.