Mload - execute a file in batch mode, invalid statement was found - response (4) by feinholz
Can we load the same table concurrently using TPT Update operator by setting seperate checkpoint files - response (4) by sreehere
Hi,
Is it possible to execute a 'Delete standalone' using update operator and another Update in the same TPT job
Define delete_operator
(
Type Update
Schema *
Attributes
(
integer maxsessions
,integer minsessions
,integer maxdecimaldigits
,varchar targettable
,varchar tdpid
,varchar username
,varchar userpassword
,varchar errortable1
,varchar errortable2
,varchar logtable
,varchar worktable
,varchar workingdatabase
,varchar DeleteTask = 'Y'
);
Apply step_Delete
('Delete from tablex where col1 > 123;')
To Operator (Delete_Operator [1]);
);
Define Operator Export_Operator
Description 'TPT Export Operator'
Type Export
Schema Schema
Attributes
(
integer maxsessions
,integer minsessions
,integer maxdecimaldigits
,varchar tdpid
,varchar username
,varchar userpassword
,varchar workingdatabase
,varchar SelectStmt = 'Select col1, col2 ...
From tablex
Where col1 = 456;'
);
Define Operator Update_Operator
Description 'TPT Update Operator'
Type Update
Schema xyz
Attributes
(integer maxsessions
,integer minsessions
,integer maxdecimaldigits
,varchar targettable
,varchar tdpid
,varchar username
,varchar userpassword
,varchar errortable1
,varchar errortable2
,varchar logtable
,varchar worktable
,varchar workingdatabase
);
Step Apply_Update
(Apply
('Update tablex
Set col3 = 'abc'
where col1 = :col1
and col2 = :col2
and col3 = :col3;'
)
To Operator (Update_Operator [1])
Select * From Operator (Export_Operator [1]);
);
Job is failing with error
RDBMS error 2550: MLoad error: bad internal status - Delete Mload Started while Import Mload suspended
Please suggest a workaround
Can we load the same table concurrently using TPT Update operator by setting seperate checkpoint files - response (5) by feinholz
I believe Teradata is giving you the answer. :)
Teradata locks the table while these operations are taking place.
So, the answer is no. You cannot have 2 TPT jobs using the MultiLoad protocol accessing the same table at the same time.
BTEQ and the Commit statement - response (1) by Adeel Chaudhry
Transactions are always implicit in ANSI session mode and in Teradata session mode, they can be defined explicitly or implicitly. So you should consider using ANSI mode.
BTEQ and the Commit statement - response (2) by Raja_KT
DDLs are auto commit. I remember vaguely in one project where I had a unix script , where we switch between btet and ANSI. It was challenging. We segregated the DMLs as per the business requirment. In ANSI, you can think of stuffing your works with commit, rollback and savepoint.
You can use:
.set session transaction ANSI
You can also think of BTET.
Cheers,
BTEQ and the Commit statement - response (3) by sgarlapa
By default in BTEQ every statment is auto commit. untill we specify .set session transaction ANSI before loggin.
By seeing your script you didn't use ANSI mode so it should be defualt BTET and so no commit requreid. Still if it is not happening because of DBS control settings, you may try below -
.SET SESSION TRANSACTION BTET
.LOGON 2/XFAH;
DATABASE PROD_TABLE;
<your remaining script with no commit statments>
--Sri
Mload - execute a file in batch mode, invalid statement was found - response (5) by cheeli
Hi Steven,
After launching "Teradata Multiload" client, I am running the following commands.
mload < C:\mload_in.txt
When I press enter, the client is still not running the command ( maybe it is expecting that the command is not complete) and hence I specified the semicolon.
I have tried to enclose the file path in double quotes and tried and even this doesn't work.
Also tried to execute the following command and still failing
mload -r '.RUN FILE C:\mload_in.txt;'
tried to run the above command using double quotes, removing semicolon inside the colons. But still facing the same error as "**** 12:59:28 UTY2403 An invalid statement was found before the .LOGTABLE statement.
**** 12:59:28 UTY2400 Error received in interactive mode will be ignored."
However, I am able run the statements in the script successfully (interactively in teradata multiload)
Mload - execute a file in batch mode, invalid statement was found - response (6) by sgarlapa
In the demo version of TD 13.0 use below process.
start->run->type 'cmd' ==> gives you dos command prompt.
At the prompt use your mload command such as -
c:\> mload < pathofmloadfile >logfilename 2>&1
It should work.
when you directly click on mload utility it start with interactive mode only then you have to type ctr+c and they at the prompt use the above command.
BTEQ and the Commit statement - response (4) by KVB
I dont think you can do that in Teradata as it is implicit.
DEFINE SCHEMA target_schema FROM TABLE - forum topic by Donald.Iuppa@teoco.com
Hi i am trying to use DEFINE SCHEMA target_schemaz FROM TABLE in a tbuild script and it is failing with
"Teradata Parallel Transporter Version 14.10.00.01
TPT_INFRA: TPT05004: CLI error 224 in connecting session (function ConnectSession).
MTDP: EM_NOHOST(224): name not in HOSTS file or names database.
TPT_INFRA: TPT04032: Error: Schema generation failed for table 'SONARTEST.EOD_USAGE' in DBS '(null)':
"GetTableSchema" status: 48."
So I beleive it need connection information but I don't know how to supply it.
Any help would be appreciated, thank you.
DEFINE SCHEMA target_schema FROM TABLE - response (1) by feinholz
On what platform are you running?
You will need to add your Teradata Database node id's and IP addresses into the /etc/hosts file (for Unix/Linux).
Please refer to the CLIv2 documentation for more information.
DEFINE SCHEMA target_schema FROM TABLE - response (2) by Donald.Iuppa@teoco.com
I'm on Windows
DEFINE SCHEMA target_schema FROM TABLE - response (3) by feinholz
Have you used any of our load/unload products before?
Mload - execute a file in batch mode, invalid statement was found - response (7) by feinholz
Have you tried running "mload" from the command line prompt (NOT from clicking on the mload utility)?
Also, you cannot use the wildcard syntax on the INSERT statement because you did not use the .TABLE command.
Change your DML statement to:
insert
into
samples.itemppi
values (:L_ORDERKEY, :L_PARTKEY, :L_QUANTITY, :L_LINESTATUS, :L_SHIPDATE);
DEFINE SCHEMA target_schema FROM TABLE - response (4) by Donald.Iuppa@teoco.com
is there a way to supply connection information in the script?
DEFINE SCHEMA target_schema FROM TABLE - response (5) by Donald.Iuppa@teoco.com
I am a newbee but making great progress - I have everything working but I am trying to generalize my scripts thus the desire to use the dynamic schema operator. I have spent several hours now going through the TPT user and reference manuals, if there is a wex based training courtse that covers this please point me at it. Thank you, --Don
DEFINE SCHEMA target_schema FROM TABLE - response (6) by feinholz
The connection information in the script is through the use of the TdpId, Username and UserPassword attributes.
But the TdpId must be in your hosts file.
Or, you can just put the IP address in the TdpId attribute.
By "dynamic schema operator", do you mean the schema mapping operator?
What is it you are really trying to do?
DEFINE SCHEMA target_schema FROM TABLE - response (7) by Donald.Iuppa@teoco.com
I am moving tables from netezza to teradata , they have the equivalent table definations. Since I have many to do, I'm trying to develop a script that could just take the table name.
I am testing the use of ODBC to move the data directly from one db to the other.
My thought was to use the DEFINE SCHEMA XXX FROM TABLE syntax so I won't need to code that part.
I have the script working by manually coding the scema directive and wish to remove that to make it generic.
On the NZ side I can create a view to output the data and timestamps columns formated correctly, although I wish that wasn't necessary. Apparently the data comes out formatted incorectly by default for loading timestamps and dates.
So I still am not able to get this working, the real operators all have an attributes section but the schema directive doesn't.
I tried this (below) as my best guess but it doesn't work, I obscured the tdpid below
ATTRIBUTES
(
VARCHAR TargetTdpId = @jobvar_tdpid,
VARCHAR TargetUserName = @jobvar_username,
VARCHAR TargetUserPassword = @jobvar_password,
VARCHAR SourceTdpId = @jobvar_tdpid,
VARCHAR SourceUserName = @jobvar_username,
VARCHAR SourceUserPassword = @jobvar_password,
VARCHAR TdpId = '10.xx.xxx.xxx',
VARCHAR UserName = @jobvar_username,
VARCHAR UserPassword = @jobvar_password
);
DEFINE SCHEMA target_schemaz FROM TABLE 'SONARTEST.EOD_USAGE';
So I don't see how to bind TdpId ,UserName and UserPassword to the schema directive.
Thank you.
Skip header row of file using TDLoad - forum topic by manharrishi
TTU for solaris - forum topic by kfiras
Hi,
I am trying to find TTU install for Solaris but I am not able to find anything of that sort for Solaris. The only thing available is CLIV1410 which is only libraries but no bin directory or tools including bteq. Any idea where I can download and install it? The website is like a maze, very hard to get what you need and most of the searchs lead to other posts only.
What do you mean by "When I click on Mload utility"?
What happens if you remove the trailing semicolon from this (not sure why you put it there):
mload < C:\mload_in.txt;