All Forums Tools
td_admirer 36 posts Joined 07/12
23 Jul 2012
Using FILLER in TPT 13.10

Hi TD guru's,

Can someone help me in identifying a way to skip a field on a file while using a LOAD operator in TPT? This is something like the "FILLER" column type that we use on MLOAD. I am on TTU 13.10.

 

Your help is highly appreciated.

 

 

ulrich 816 posts Joined 09/09
23 Jul 2012

Can you share your script? 

An example from the documentation:

DEFINE SCHEMA PRODUCT_SOURCE_SCHEMA
(
Associate_Id integer,
Associate_Name char(25),
Salary float,
DOJ ansidate,
Designation varchar(25),
Loan_Amount decimal(5,2),
Martial_Status char(1),
No_Of_Dependents byteint
);

DEFINE OPERATOR LOAD_OPERATOR
TYPE LOAD
SCHEMA *
ATTRIBUTES
(
VARCHAR PrivateLogName = 'load_log',
VARCHAR TdpId = @jobvar_tdpid,
VARCHAR UserName = @jobvar_username,
VARCHAR UserPassword = @jobvar_password,
VARCHAR TargetTable = 'DDL046_stg',
VARCHAR LogTable = 'DDL046_stg_log',
VARCHAR ErrorTable1 = 'DDL046_stg_e1',
VARCHAR ErrorTable2 = 'DDL046_stg_e2'
);

STEP STEP2
(
APPLY ('INS INTO DDL046_stg (:Associate_Id,
:Associate_Name,
:Salary,
:DOJ,
:Designation,
:Loan_Amount,
:Martial_Status,
:No_Of_Dependents);')
TO OPERATOR (LOAD_OPERATOR[2])

Lets assume you don't want to load the Salary.

Then you could simply not use it in STEP STEP2 definition, which would end up as

STEP STEP2
(
APPLY ('INS INTO DDL046_stg (:Associate_Id,
:Associate_Name,
:DOJ,
:Designation,
:Loan_Amount,
:Martial_Status,
:No_Of_Dependents);')
TO OPERATOR (LOAD_OPERATOR[2])

This assumes the the underlying table does also not have this field...

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

td_admirer 36 posts Joined 07/12
24 Jul 2012

Hi Ulrich,

Thank you. That worked for me.

You must sign in to leave a comment.