compare tables data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Pacific007
Participant
Posts: 35
Joined: Wed Oct 06, 2010 11:24 am

compare tables data

Post by Pacific007 »

Hi,

I have pairs of tables metadata is partially matching and I need to compare data of every pair of table most preferably on key column as metadata is partially matching. In output I want the both the tables data count and the mismatch count and a flag column if comparision match or doesnot match.

I want generic Job so that all the pair of tables can be match with out doing any further modification to the job.

Please provide me inputs and revert if anybody needs further details.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need a special component from Unseen University School of Inadvisably Applied Magic.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Pacific007
Participant
Posts: 35
Joined: Wed Oct 06, 2010 11:24 am

Post by Pacific007 »

Ok I will explain it more easily...The problem is we have source table and target table, we are loading target table with some transformation, but key columns are not derived just matched with may or may not data type conversion. now we have to match the source and target tables pairs and found out the count at source side, target side and a flag column if matched or not matched.
Pacific
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, "compare tables counts" rather than "compare tables data" it would seem. What have you tried? Seems like parameterized table names, selecting a count from both the source and target tables, joining those two inputs and comparing the results would be fairly straight-forward.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't think so, Craig. The question is counts of matched and non-matched records from a join, but without metadata. This is impossible; even with RCP enabled, at the very least join keys must be specified. There is an approach using upstream Modify stage to generate join key names using job parameters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, I was thinking a mismatch of the total count was all that was needed, but if it is counts of matching and non-matching records per table then as you said it's not possible without some amount of metadata.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply