I am slowly trying to transition from server to parallel,so please bear with me.
I have a sequential file as a source which has a varchar column Col1(nullable set to yes).
So for that particular column i have set the Null field value to ' '.
So this means that if file encouters null value for the column col1 it will replace it with
a ' '.
After the sequential file i have transformer and then my target is also Sequential file.
Now my question is do i have to check for ISNull(Col1) in transformer as my Target sequential file
has nullable for that column set to No.
Welcome aboard . There is a difference in ' ' and NULL. So in transformer you need to check for ' ' and not NULL. Also If your target is Nullable No then do you need to retain those records or reject them? Please give some sample records,With the metadata definations.
Ok,I should handle the nulls as i have set the Nullable column in Target sequential file to No.
If they want me to populate the Null values too,should i set to Nullable column to Yes and probably not check for IsNull() in the transformer.
Am i right.
Since you are replacing NULL with a ' ' @source. In Transformer you need to check for ' ' and apply the bussiness logic. If you want to populates nulls in the target stage, Then in transformer you can write this derivation,
If
lnk.inputcolumn = ' '
Then
SetNull()
Else
lnk.inputcolumn.
Now map the column to the output column with output as nullable yes. Make sure you have done Null handling at target side Sequential stage also.
If they want me to replace a Null for Col1 in source with ' ' than i should'nt be handling anything in the transformer right.I just have to set the Null Handle Value for that column to ' '.
Am i right.