Page 1 of 1

Extracting data driven by a values in a hash file?

Posted: Tue Nov 09, 2004 10:35 pm
by PilotBaha
I have the following job structure.

HASH FILE
|
| DsLink1
|
TRANSFORMER --------->>> Hash File
^
|
|DSLink2
|
|
ODBC

I just want to be able to extract data from the ODBC stage using a query similar to

SELECT * from ODBC_Table
where OT_ITCGY = '1'AND
OT_ITEM <= DSLink1.UpperLimit AND
OT_ITEM >= DSLink1.LowerLimit;

The ODBC stage and the HashFile Stage doesn't share a common key.

Eventually I can eliminate the HashFile stage and hard code the join myself in ODBC stage itself, but what's the fun of doing that? :)

I hope the question is clear enough..

Thanks.

[/img][/list]

Posted: Wed Nov 10, 2004 12:12 am
by ray.wurlod
This should work. For each row in the hashed file there is a set of two columns possibly called UpperLimit and LowerLimit.

DSLink1 is the stream input and DSLink2 is a reference input link.
You can constrain which rows are delivered from the hashed file using the Selection tab; if you don't use the Selection tab then check the "record level read" check box.

UpperLimit and LowerLimit in the ODBC table are asserted to be keys (whether or not they are not).

Check the "multi-row return" check box.

If the target hashed file is the same as the source hashed file, you need to ensure that the key column value is passed through the job design, and that metadata match in both hashed file stages.