Can anyone give a simple working example of using a "transform" operator in a "generic" stage.
I am trying to achieve a simple thing - to trim and concatenate two or more columns, but these columns' names are known only during runtime.
example inputs:
col1: 'aa '
col2: ' bb'
example outputs:
col1: 'aa '
col2: ' bb'
col3: 'aabb'
I am trying with this code (which I put into generic stage as below):
Code: Select all
transform
-expression 'col3=u_trim_leading_trailing(col1)+u_trim_leading_trailing(col2)'
-flag compileAndRun
This setup gives these problems:
Code: Select all
Warning:Generic_270: The number of reject datasets "0" is less than the number of input datasets "1". [transform/transform.C:1950]
Fatal:Generic_270: Expected semi-colon; [line 1, character 89]. [transform/parse.C:1433]
- 1. I build a static job using a stage that l later want to change to generic (for example lookup stage)
2. I compile that static job
3. I look into "Job properties -> Generated OSH" and I copy the code for lookup operator
4. In my target job I use generic stage and I paste copied code into "Stage -> Properties -> Options -> Operator" field
5. I make that field parametric and my whole job is dynamic
Code: Select all
transform
-flag run
-name 'V0S285_CopyOfst_SK_update1_Transformer_285'
I tried the DS documentation but all I found is this:
http://pic.dhe.ibm.com/infocenter/iisin ... sform.html
...and it does not really specify the example of using a correct expression options.
Any help is greatly appreciated.
Regards
Tomasz