Sequence file stage Defaut NULL String property

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

Sequence file stage Defaut NULL String property

Post by Veni »

in server Sequence file stage there is a property called Defaut NULL String , what is same property in
Parallel Extender


and also incoming data from sequence file is coming with dot (.) i want this should convert into null
default , in coming column field is numeric.

what could be the possible solution for this question.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As with the server equivalent, you have a null value replacement property in the stage properties. It is an optionally added property - you will find it in the bottom right pane when record-level properties are selected.
As with server jobs you can override this on a per-column basis. Open the Columns tab, select the row on the grid that you want to change, right mouse click and Edit Row. You should find the property readily enough.
Beware that the null-representing value (or the null-replacement value) must have the same width as the width of a fixed-width column. Parallel jobs are finicky about data types being correct.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

Post by Veni »

"I can able to see the Nullable -> Null Filed Value property in Column Edit row

But when i am giving (.) period in that place my output is coming as "NULL " string not as oracle NULL value

I wanst to replace my all (.) period in NULL value "
rv
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Veni,

that is the difference - the null in the defaults is not an oracle null value. You will need to put this conversion in a modify stage or a transform. I think it will be best to keep the period to 0x00 conversion and then use the handle_null in a modify stage. An alternative that is not quite as efficient would be to remove your handling of the input and then use the CONVERT function in a transform stage, converting the period to char(128).
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

Post by Veni »

Thanks for your immideate response

Is there no any other possible way because my source is having 1220 field out of that 700-800 filed are numeric (where i have to convert dot (.) to oracle NULL )so using modify or transformer stage is tedious process.

In Modify stage i can't bring 700-800 fields or i can use trim and SetNull function to replace dot (.) in transformer .Is it make sence in term of performance ?
rv
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If your source is a sequential file, define it as having 1 column (with a very long string) and no delimeters, read it and perform the conversion of all "." to CHAR(128), write it back, then read it as before. Or use any one of many different UNIX level options to effect the same change to the file.

Sure it is tedious to put a handle_null in all the columns, but you could always do just a couple, export the job as a .dsx file to see how it is done and use an editor to manually insert all the other handlers. Or you could use a transform stage which will let you perform like operations across columns.
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

Post by Veni »

conversion of all "." to CHAR(128) - What does it means and how to do it ?
rv
Post Reply