Hello,
I have a job where I am loading data from a flat file to a database.
Flat file -> Transformer -> Db2 API Stage
I know that there are 100 records in the flat file. Now I want to know how many of them are inserted into the DB2 Tables?
I can get that by saying select (*) from db2.table, but how can I do a comparision between the flat file content to that of Db2 count? Is there a way in which I can accesss Db2 counts with in the same job?
Regards,
how to access DB2 Counts in a job
Moderators: chulett, rschirm, roy
how to access DB2 Counts in a job
Regards,
Shree
785-816-0728
Shree
785-816-0728
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No.
DataStage will tell you how many rows it sent to DB2, and can capture any that were rejected (which you could also count and perform arithmetic).
But the only way you can reliably determine what's in a table is to query the table.
If your records include a run identifier or last updated timestamp, you can constrain your query on that column.
DataStage will tell you how many rows it sent to DB2, and can capture any that were rejected (which you could also count and perform arithmetic).
But the only way you can reliably determine what's in a table is to query the table.
If your records include a run identifier or last updated timestamp, you can constrain your query on that column.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: how to access DB2 Counts in a job
You can use the @inrownum function in the transformer and output the result to a flat file or a table