IsNotNull in transformer stage - won't compile
Posted: Sun Dec 01, 2013 9:15 pm
Hi everyone,
I have a Sequential File stage connected to a Transformer stage and then onto an Oracle DB stage loaded onto the server. The information in the Sequential File stage is coming from a .csv and all information is in single rows, so I am using the Field function in the Transformer to split the long row up into segments and put into individual columns in the Oracle stage.
SF column name = EMP_DATA
SF stage link = Employee_Source
The pipe | is the delimiter in the .csv
I am trying to use the IsNotNull function to firstly look at all rows that aren't null and keep them being populated with data as normal, and then looking at all values that are Null and adding the word 'UNKNOWN' to these rows.
I have tried to get it to work but have been unsuccessful. This is my code:
If IsNotNull(Field(Employee_Source.EMP_DATA,'|',47)) Then (Field(Employee_Source.EMP_DATA,'|',47)) Else 'UNKNOWN'
I should also add that is has been working fine and populating rows and columns in the table absolutely fine with the basic: Field(Employee_Source.EMP_DATA,'|',47)
It is only the IF statement combined with the IsNotNull that isn't working.
If anyone can help me or provide any advice I'd greatly appreciate it!
Thanks :D
I have a Sequential File stage connected to a Transformer stage and then onto an Oracle DB stage loaded onto the server. The information in the Sequential File stage is coming from a .csv and all information is in single rows, so I am using the Field function in the Transformer to split the long row up into segments and put into individual columns in the Oracle stage.
SF column name = EMP_DATA
SF stage link = Employee_Source
The pipe | is the delimiter in the .csv
I am trying to use the IsNotNull function to firstly look at all rows that aren't null and keep them being populated with data as normal, and then looking at all values that are Null and adding the word 'UNKNOWN' to these rows.
I have tried to get it to work but have been unsuccessful. This is my code:
If IsNotNull(Field(Employee_Source.EMP_DATA,'|',47)) Then (Field(Employee_Source.EMP_DATA,'|',47)) Else 'UNKNOWN'
I should also add that is has been working fine and populating rows and columns in the table absolutely fine with the basic: Field(Employee_Source.EMP_DATA,'|',47)
It is only the IF statement combined with the IsNotNull that isn't working.
If anyone can help me or provide any advice I'd greatly appreciate it!
Thanks :D