HI,
thans all for your help.
I have a job as follow :
an input seq file ----> trasformer------> db2 stage.
i need to insert in a table a log message for each record rejected.
the message have to contain the name of the column that raise the error.
how can i do????
thanks to all.
LOG WITH THE NAME OF THE COLUMN ...
Moderators: chulett, rschirm, roy
If you know what the condition is that would reject the record then
use the constraint rather than default reject. When you use a constraint
you can trap (know) the column that is causing the reject and assign this to a stage variable and get this passed over as a derivation.
If anyone has a better way of getting this done, please suggest
Rahul
use the constraint rather than default reject. When you use a constraint
you can trap (know) the column that is causing the reject and assign this to a stage variable and get this passed over as a derivation.
If anyone has a better way of getting this done, please suggest
Rahul
This is of course dependent on your business rules for validating each column. You basically interrogate each condition and report the column.
Seq File -> Transformer --> Db2 stage (insert/update)
--> Log/Errors Stage (constraint
contains the business rules for validation).
Log/Errors
DsJobName DatStageJobName
@INROWNUM InputRowNum
If (col1...Then 'col1' else if col2... then 'col2') Error Message
...
I have a job as follow :
an input seq file ----> trasformer------> db2 stage.
i need to insert in a table a log message for each record rejected.
the message have to contain the name of the column that raise the error.
how can i do????
thanks to all.
Seq File -> Transformer --> Db2 stage (insert/update)
--> Log/Errors Stage (constraint
contains the business rules for validation).
Log/Errors
DsJobName DatStageJobName
@INROWNUM InputRowNum
If (col1...Then 'col1' else if col2... then 'col2') Error Message
...
I have a job as follow :
an input seq file ----> trasformer------> db2 stage.
i need to insert in a table a log message for each record rejected.
the message have to contain the name of the column that raise the error.
how can i do????
thanks to all.
You can also do a --> Transform Stage --> db2 (output to log) instead of Log/Error Stage (which I hope the above author intends to say as a buildop, not as a BASIC script...) Within the transform stage, you can pre-format the output for whatever format your log table is.1stpoint wrote:This is of course dependent on your business rules for validating each column. You basically interrogate each condition and report the column.
Seq File -> Transformer --> Db2 stage (insert/update)
--> Log/Errors Stage (constraint
contains the business rules for validation).
Log/Errors
DsJobName DatStageJobName
@INROWNUM InputRowNum
If (col1...Then 'col1' else if col2... then 'col2') Error Message
...
I am not sure about DB2 (as I don't have DataStage here), but I know that Oracle have an option where you must explicitly state to output rejected row within the output stage.
I hope we both provided you with enough to resolve your issues.
-T.J.
Developer of DataStage Parallel Engine (Orchestrate).