Easy Loader for Teradata Parallel Transporter

Tools
Tools covers the tools and utilities you use to work with Teradata and its supporting ecosystem. You'll find information on everything from the Teradata Eclipse plug-in to load/extract tools.
Teradata Employee

Re: Easy Loader for Teradata Parallel Transporter

Well, that is true about a lot of the postings on this page, but so far we have not enforced rules as to how/what/where people can post their questions. Yes, it would be nice for people to only post questions that are related to the top title of this page. But sometimes, posts become conversations which morph into various topics.
-- SteveF
Enthusiast

Re: Easy Loader for Teradata Parallel Transporter

I'm not stopping anyone. But they might find a broader audience with experience in the subject area if they post it in the forum (particularly if not related to TPT).

Re: Easy Loader for Teradata Parallel Transporter

Hi Steven,

i posted this question 2 days back but since its going to get lost in the other posts before getting answered i am posting it again. can you please answer my question.

in TPT there is an way to trim the Trailing Blanks using "TrimTrailingBlanks" option. Because of the way our source is giving us the data we get trailing blanks. Is there a way to do the same thing using TDLOAD?

Thanks
Teradata Employee

Re: Easy Loader for Teradata Parallel Transporter

No, that option is not currently available with Easy Loader.
-- SteveF

Re: Easy Loader for Teradata Parallel Transporter

hi

Re: Easy Loader for Teradata Parallel Transporter


Hi I am able to load the data to a table from flat below using below script. But values in flatfile are enclose with " so it is loading the same into table . Inorder to avoid loading " is there any attribute to be defined?

DEFINE JOB FILE_LOAD
DESCRIPTION 'Load a Teradata table from a file'
(
DEFINE SCHEMA Trans_n_Accts_Schema
(
Transaction_Id VARCHAR(256),
Risk_Classification VARCHAR(256) ,
Risk_Classification_Date VARCHAR(256),
Revised_Risk_Class_Reason VARCHAR(256),
Revised_Risk_Class_Author_Appr VARCHAR(256),
Revised_Risk_Classification VARCHAR(256)
);
DEFINE OPERATOR DDL_OPERATOR
TYPE DDL
ATTRIBUTES
(
VARCHAR PrivateLogName = 'ddl_log',
VARCHAR TdpId = @myTdpId,
VARCHAR UserName = @myUserName,
VARCHAR UserPassword = @myUserPassword,
VARCHAR ErrorList = '3807'
);
DEFINE OPERATOR FILE_READER
TYPE DATACONNECTOR PRODUCER
SCHEMA Trans_n_Accts_Schema
ATTRIBUTES
(
VARCHAR PrivateLogName = 'dataconnector_log',
VARCHAR DirectoryPath = '/ap02d/cfdw/data_files/ERISK/incoming/',
VARCHAR FileName = 'RISK_CLASS_DATA.csv',
VARCHAR Format = 'Delimited',
VARCHAR OpenMode = 'Read',
VARCHAR TextDelimiter = ','
);
DEFINE OPERATOR LOAD_OPERATOR
TYPE UPDATE
SCHEMA *
ATTRIBUTES
(
VARCHAR PrivateLogName = 'update_log',
VARCHAR TdpId = @myTdpId,
VARCHAR UserName = @myUserName,
VARCHAR UserPassword = @myUserPassword,
VARCHAR TargetTable = 'db_main' || '.Trans',
VARCHAR LogTable = 'db_main' || '.LG_Trans',
VARCHAR ErrorTable1 = 'db_main' || '.ET_Trans',
VARCHAR ErrorTable2 = 'db_main' || '.UV_Trans',
VARCHAR WorkTable = 'db_main' || '.WRK_Trans'
);

STEP Setup_Tables
(
APPLY
('DROP TABLE ' || 'db_main' || '.ET_Trans;'),
('DROP TABLE ' || 'db_main' || '.UV_Trans;'),
('DROP TABLE ' || 'db_main' || '.LG_Trans;'),
('DROP TABLE ' || 'db_main' || '.WRK_Trans;')
TO OPERATOR (DDL_OPERATOR);
);

STEP Load_Trans_Table
(
APPLY
('INSERT INTO ' || 'db_main' || '.Trans(Transaction_Id,
Risk_Classification,
Risk_Classification_Date,
Revised_Risk_Class_Reason,
Revised_Risk_Class_Author_Appr,
Revised_Risk_Classification,
ECTL_DATA_SRCE_ID)
VALUES(:Transaction_Id,
:Risk_Classification,
:Risk_Classification_Date,
:Revised_Risk_Class_Reason,
:Revised_Risk_Class_Author_Appr,
:Revised_Risk_Classification,
9);')
TO OPERATOR (LOAD_OPERATOR[2])
SELECT * FROM OPERATOR(FILE_READER[2]);
);
);
Not applicable

Re: Easy Loader for Teradata Parallel Transporter

Hi,

Our shop is pretty new to TPT and tdload. I am trying to test tdload but I'm having problems when I try to pass an Account ID.

I'm executing tdload using the following command:
tdload --SourceFileName file.txt --TargetUserName user_1 --TargetUserPassword password_1 --TargetAccountId $L$DEV0 --TargetWorkingDatabase target_db --TargetTable target_tbl --TargetTdpId test_tdpid

I get the following error message:
Teradata Parallel Transporter Version 13.10.00.04
TPT_INFRA: TPT04094: Error: Line 1 of tbuild Command Line: Invalid token expression:
no tokens.
Job script preprocessing failed.
Job terminated with status 8.
Teradata Load Utility Version 13.10.00.04
account_id: '$L$DEV0'
+ Res=0

This problem occurs when I specify the --TargetAccountId option. The process works when I try to remove "--TargetAccountId $L$DEV0" but I need to supply it as it is required in our shop. I'm pretty sure the Account ID ($L$DEV0) works because I am able to use it in BTEQ.

Does anybody know how I can resolve this? The 2nd problem I have with this is that tdload returns a 0 return code even though the process failed. Is this a bug?

I appreciate any help in advance. Thanks!
Teradata Employee

Re: Easy Loader for Teradata Parallel Transporter

Babugandi: in TPT14.0 we introduced the support for quoted delimited strings. The 14.0 documentation will provide the details.
-- SteveF
Teradata Employee

Re: Easy Loader for Teradata Parallel Transporter

got_boys_123: did you try enclosing $L$DEV0 in double-quotes? Also, on Unix, try to put a backslash ("\") in front of the "$" characters. The reason for the failure is that the Unix shell is processing the "$" before it gets to tdload.
-- SteveF
Highlighted
Enthusiast

Re: Easy Loader for Teradata Parallel Transporter

tdload has a -S option to generate and persist the TPT script. This could be useful to save time in generating coorect TPT scripts. Where can the TPT script be located ? It was not in the working dirctorory. Thanks .