Quantcast
Channel: Teradata Forums - Tools
Viewing all articles
Browse latest Browse all 4252

TPT - LOAD TWO FIELDS IN ONE COLUMN (concatenate) - response (2) by feinholz

$
0
0

It is possible. You need to define 2 schemas. One as the input schema for the DataConnector operator and one as the output schema for the DataConnector operator.
 
Something like:
 
DEFINE SCHEMA <name_1>
(
F1 CHAR(10),
F2 CHAR(10)
);
 
DEFINE SCHEMA <name_2>
(
COL1 CHAR(20)
);
 
Then in your DC operator definition:
 
DEFINE OPERATOR <some-name>
TYPE DATACONNECTOR PRODUCER
INPUT SCHEMA name_1
OUTPUT SCHEMA name_2
. . . . .
 
And then in the SELECT statement (in the APPLY-SELECT):
 
    APPLY 'INSERT INTO DHPVP2IT_W.TESTE_TPT_ZE
             (  COL1  )
            VALUES
             ( :COL1 )
    TO OPERATOR ( $LOAD()[1] )
    SELECT F1 || F2 AS COL1 FROM OPERATOR ( $FILE_READER[1] );
 
(I think something like this should work.)
 


Viewing all articles
Browse latest Browse all 4252

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>