Page 1 of 1

Need to Implement Null Handling in a RCP job

Posted: Tue Jun 12, 2012 4:04 am
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.

Posted: Tue Jun 12, 2012 4:43 am
by vamsi.4a6
Just try with Null Field value as ' '[give 9 spaces] instead of ' '[1 space]

Posted: Tue Jun 12, 2012 4:51 am
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.

Posted: Tue Jun 12, 2012 8:05 am
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,

Posted: Tue Jun 12, 2012 8:49 am
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.