Sparse lookup with TD

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
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Sparse lookup with TD

Post by DS_FocusGroup »

I am trying to do a sparse look up with teradata. i have defined a SQL in the teradata connector stage .

Code: Select all

SELECT * 
FROM 
TABLE_XYZ
WHERE 
ARRG_ID = ORCHESTRATE.ARRG_ID
AND ARGFIN= 'ABC     '
i am getting the following error.

Code: Select all

Lookup_PaymentIn: [IIS-CONN-TERA-005011] Field ARGFIN is unreferenced in the SQL statements (CC_TeraDBRecordDataSetConsumer::setDataSetDef, file CC_TeraDBRecordDataSetConsumer.cpp, line 620)
Although its there in the SQL which i have specified i am not sure why is it saying the field is not being referenced.
Any help on this please?
thanks!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think it wants to see

Code: Select all

SELECT * 
FROM 
TABLE_XYZ 
WHERE 
ARRG_ID = ORCHESTRATE.ARRG_ID 
AND ARGFIN= ORCHESTRATE.ARGFIN
The lookup expects the lookup keys to be supplied from the stream input, via the ORCHESTRATE structure.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

Great. There were two fields defined as keys in the lookup stage one of which was ARGFIN. Although it was not being used in the SQL itself because a hardcoded value had to be passed there for it. So the solution you provided worked for this error. And to make it work for the given scenario so that it can use a hardcoded value, i had to remove it from the
lookup stage ?... works now but gives a warning.

Code: Select all

Unable to determine association between statement parameters and table columns. The connector will not be able to obtain external schema and only limited schema reconciliation will be performed
:roll:

Thanks!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Alas, you have to play the game by its rules if you don't want the warnings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

There is another way to get rid of that error that says, "Field ARGFIN is unreferenced in the SQL statements". As you discovered, the problem was that your lookup key contained field ARGFIN, but your SQL did not contain ORCHESTRATE.ARGFIN. In the connector properties, there is a property called "Unused field action". Its default is Abort, which means the connector should abort if an input column is not referenced in the SQL. You can change it to one of the other values (Drop, Warn, or Keep) to get rid of the error.
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

Thanks alot!!!
DS_FocusGroup
Premium Member
Premium Member
Posts: 197
Joined: Sun Jul 15, 2007 11:45 pm
Location: Prague

Post by DS_FocusGroup »

Thanks alot!!!
Barath
Participant
Posts: 17
Joined: Mon Sep 29, 2008 4:00 am
Location: Mumbai

getting same error

Post by Barath »

But ray.wurlod I am getting same error in when I am Insert into target table. I am getting below issue
[IIS-CONN-TERA-005011] Field xxxx is unreferenced in the SQL statements (CC_TeraDBRecordDataSetConsumer::setDataSetDef, file CC_TeraDBRecordDataSetConsumer.cpp, line 655). Can u help with this. How to clear error. my insert statment is insert into ABC(A,B,C)values(243, current_timestamp, orchestrate.xxxx);
Thanks In advance..
Barath
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That is not the same problem.

One was a SELECT, yours is an INSERT. There are many other things to consider.

So as future searchers aren't confused please begin a new thread.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chowdhury99
Participant
Posts: 43
Joined: Thu May 29, 2008 8:41 pm

Post by chowdhury99 »

Remove the unnecessary columns from the source sides.

Thanks
Post Reply