I'm testing implicit conversion in sequential file stage. The seq file has single column with 7 rows:
1
aaa
3333
4A
4B8
345.7
2006-10-20
My output definition for col1 is Integer as I want any non integer data to be sent to the reject link.
However when I view the data in data browser, I'm getting the following rows :
1
3333
4
4
345
2006
I'm totally perplexed as I would expect the original rows 2,4,,5,6,7 would be rejected by implicit conversion and should only return
1
3333.
can someone please help my understanding why this is happening and how could I achieve my aim.
Karine
implict conversion in sequential stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It is obvious WHAT is happening, WHY is far less apparent. What is the field delimiter, quote and final delimiter character specified? Please also advise the record delimiter property value. Then we can try to reproduce.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Now we need to know the data type specified for your single field.
I would imagine, as you did, that if it's integer then the rows containing non-numeric characters should be dropped or sent along a reject-handling link.
I have reproduced this, it also occurs with the record delimiter property set to "UNIX newline" both with and without the final delimiter property. I think you've uncovered a bug, which you need to report through your support provider.
Meanwhile, as a workaround, import the field as a VarChar and test its integer quality in a Transformer stage using the IsValid() function.
I would imagine, as you did, that if it's integer then the rows containing non-numeric characters should be dropped or sent along a reject-handling link.
I have reproduced this, it also occurs with the record delimiter property set to "UNIX newline" both with and without the final delimiter property. I think you've uncovered a bug, which you need to report through your support provider.
Meanwhile, as a workaround, import the field as a VarChar and test its integer quality in a Transformer stage using the IsValid() function.
Code: Select all
IsValid("int32",InLink.TheField)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.