Need to Implement Null Handling in a RCP job

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
creatingfusion
Participant
Posts: 46
Joined: Tue Jul 20, 2010 1:26 pm
Location: USA
Contact:

Need to Implement Null Handling in a RCP job

Post by creatingfusion »

I have a job wherein the RunTime Column Propagation is enabled.
The job is designed as under:

Dataset -----> Fileset.

The Dataset, Fileset names are path passed as parameters.
And the metadata is propagated at runtime using RCP.

Now the Dataset passed have four columns
A (Integer 5)
B (Integer 5)
C (Decimal 9)
D (Decimal 9)
among which A and B are not null while C and D are nullable.

The dataset has zero rows. When i execute the job get the following warnings on the not null fields as shown below.

Fileset: When checking operator: When validating export schema: At field "C": "null_field" length (1) must match field's fixed width (9)
Fileset: When checking operator: When validating export schema: At field "C": "null_field" length (1) must match field's fixed width (9)

In the RCP Job I have defined the Null Field value as ' ' and padding char as space in the fileset format properties.

Please let me know how to get rid of the warnings. The job is intended to read different files with varying metadata.
Last edited by creatingfusion on Tue Jun 12, 2012 6:41 am, edited 1 time in total.
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

Just try with Null Field value as ' '[give 9 spaces] instead of ' '[1 space]
creatingfusion
Participant
Posts: 46
Joined: Tue Jul 20, 2010 1:26 pm
Location: USA
Contact:

Post by creatingfusion »

Thanks but -
Require generic approach - 9 space would be specific to the metedata here in input but the input dataset can have varied number of columns and varying metadata.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You could use a modify stage with a parameterized specification statement, using the handle_null() function as documented in the Parallel Job Developer's Guide, which is included with Information Server and is also available online. Each nullable column will require handle_null() call;

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Obviously you have got a problem with your column-definitions within the schema-file.
You specified your column as CHAR(9) or the file itself as fixed-length, but your NULL-Value is not long enough. Specify a NULL-Value of correct length within the schema-file or specify the file/the column as of variable length.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
Post Reply