Page 1 of 1

Runtime Column Propagation and inserting into DB

Posted: Fri Jun 24, 2011 5:44 am
by Cranie
Hi,

Its been a long time since I have developed in DS (usually admin only).

I am trying to write the following job:

Teradata1 -> sort1 -> Copy1 -> merge
then
Teradata2 -> sort2 -> Copy2 -> merge

From the merge (same stage) I have two output links, one for good records, one for bad as following:

Merge -> Teradata3
L - -> Teradata4

What I have in the Teradata3 and 4 stages SQL is:

Code: Select all

INSERT INTO #pTDRESDB#.#pTDRESTABLE#
(DBName, TBName, CompareResult, DataDate, RowCount
VALUES ('#pTDSRCDATABASE#','#pTDSRCTABLE#','OK',?,?)
Where I want ? and ? to be the columns that are generated via the runtime column propagation. Obviously this is failing:
Teradata_Connector_81: 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
Is there any way I can achieve this (in the one job) without writing a separate load job?

Thanks.

Re: Runtime Column Propagation and inserting into DB

Posted: Fri Jun 24, 2011 6:53 am
by BI-RMA
Hi Cranie,

What You are doing seems rather strange to me. Runtime Column propagation assumes that you do not necessarily know the columns contained in the flow at runtime.

Your SQL-Statement, however, knows precisely, of which columns your target-table consists. Are you sure that your data-flow does not try to send more columns down the stream than you expect? Check this by using a peek-stage or - if possible -by creating the target-table.

Posted: Fri Jun 24, 2011 7:36 am
by Cranie
Think you are right.. Think I have over complicated this.. lol.

Its the next job (comparing all columns). which I will need to do something similar. I'm going to close this topic and hang my head in shame.