Page 1 of 1

Modify stage specification has more than one conversions

Posted: Wed Jun 29, 2011 12:09 pm
by madsongtel
Hi All,

Please clarify my doubt regarding Modify stage,
i am using two modify conversions in one specification like
NEW_COLUMN = COLUMN_A; COLUMN_C = handle_null(COLUMN_C,0);
Reason for using like this is, i will parameterize the specification and pass that at run time. i have 100 jobs with different layouts and load into 100 tables with schmema name using RCP, and i have to do datatype conversions, drop an null handle in all files.

If we can do this then one job is enough to load data from file to table.
i see in DS parallel advanced guide like this but there using $osh command.

i am trying to implement but getting errors.

Please give us suggestions and let us know how to achieve this.


Thanks in Advance.

Posted: Wed Jun 29, 2011 12:29 pm
by jwiles
You can specify however many modify statements you can fit into a job parameter.

If you're receiving errors then likely there is an issue with one or more of the modify statements. We can't tell here because you didn't supply the errors or the statements.

Regards,

Posted: Thu Jun 30, 2011 1:36 am
by madsongtel
Hi jwiles,

Thanks for your response.
Could you please give me an example with any two conversions in one specification..

I am not able to do any two conversions in one Specification.

Thanks in Advance.

Posted: Thu Jun 30, 2011 2:49 am
by ray.wurlod
It may be (I can't test at this time) that you can only have a single specification in one field in the GUI, but can have more than one in a job parameter that you refer to in the Modify stage itself.

Posted: Thu Jun 30, 2011 5:06 am
by jwiles
It's definitely possible both entered directly in the GUI as well as through a job parameter. The format shown in the advanced developer guide is correct for the GUI as well, except that you don't need to add the trailing semicolon at the end of the line. The GUI compiler will do that when it creates the osh code that represents your job. You will still need to use the semicolon to separate the conversions.

You can add the $OSH_DUMP environment variable to see if the modify operator is correctly built from your job parameter at runtime.

Regards,

Posted: Sat Jul 02, 2011 8:06 am
by madsongtel
Thanks Jwiles, Its working.