Quantcast
Channel: Teradata Forums - Teradata Applications
Viewing all 545 articles
Browse latest View live

Import Tab delimited file through Teradata fast load utility is not working. - forum topic by Jayakumar.mm

$
0
0

I am facing an issue in executing below scritp  through fast load utility for tab delimited .txt file
1. First issue in .RECORD 1;
2. IF I remove .RECORD 1; from the code, I am getting "Specified string does not have matchSpecified string does not have match FDL4800 Invalid FastLoad statement" 
Please help on this issue.
 

.SESSION 4;

 

.LOGON server/user;

 

BEGIN LOADING TABLENAME

 

 

.RECORD 1;

 

.IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";

 

DEFINE

 

COLUMN1 VARCHAR (10)),

COLUMN2 VARCHAR (10)),

COLUMN3 VARCHAR (10)),

COLUMN4 VARCHAR (10)),

COLUMN5 VARCHAR (20)),

COLUMN6 VARCHAR (10)),

COLUMN7 VARCHAR (5)),

COLUMN8 VARCHAR (30)),

COLUMN9 VARCHAR (10)),

COLUMN10 VARCHAR (10)),

COLUMN11 VARCHAR (20)),

COLUMN12 VARCHAR (20)),

COLUMN13 VARCHAR (10)),

COLUMN14 VARCHAR (20)),

COLUMN15 VARCHAR (10))

 

FILE="C:\sample.txt"

 

.BEGIN LOADING TABLE_NAME

 

INSERT INTO TABLE_NAME

VALUES

(

:COLUMN1,

:COLUMN2,

:COLUMN3,

:COLUMN4,

:COLUMN5,

:COLUMN6,

:COLUMN7,

:COLUMN8,

:COLUMN9,

:COLUMN10,

:COLUMN11,

:COLUMN12,

:COLUMN13,

:COLUMN14,

:COLUMN15

);

 

END LOADING;

.LOGOFF;


Import Tab delimited file through Teradata fast load utility is not working. - response (1) by dnoeth

$
0
0

There's a missing semicolon:

.BEGIN LOADING TABLENAME;
.RECORD 1;
.IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";

 

Import Tab delimited file through Teradata fast load utility is not working. - response (2) by Jayakumar.mm

$
0
0

Thanks a lot. It works great now.

Import Tab delimited file through Teradata fast load utility is not working. - response (3) by Jayakumar.mm

$
0
0

Hi Team,
I am able to execute the script successfully now but 60% of records go to error table2 and only 40% records inserted into actual table. I am not able to find any difference in records inserted into error and actual table.
Please help to identify the issue.
 

Import Tab delimited file through Teradata fast load utility is not working. - response (4) by Fred

$
0
0

Your target table has a Unique Primary Index and your input has multiple records with the same PI value. For each PI value, one row is loaded and the others go to Error Table 2.

How to see Information In Data Dictionary in teradata after stats collections - forum topic by kumarvaibhav1992

$
0
0

There are 3 locations. DBC.ColumnStats, DBC.IndexStats, and DBC.MultiColumnStats where the information for the stats used to get stored.i'm giving the below query to find that info regarding no of rows in a table or average row size  etc.
SEL* FROM DBC.COLUMNSTATS WHERE TABLENAME LIKE'%INFA_SOURCE12%'
This Query is not working for me .please correct me if i'm going wrong somewhere

Tags: 

How to see Information In Data Dictionary in teradata after stats collections - response (1) by Fred

$
0
0

What database version? Always use the "V" suffix version of DBC views (since TD12).
When you say it's "not working", do you mean that the query runs but returns no rows?

Multiple sessions in Fastload - forum topic by kumarvaibhav1992

$
0
0

i tried making two sessions in fasload 1st got passed with inserion and 2nd didnt showed any such behaviour.
so why cant we have multiple sessions in fastload to load multiple tables?

Tags: 

Teradata Syntax Trouble - response (9) by nhoigal

$
0
0

Hi all,
 
I would appriciate your help with the following code:

SELECT	vm.merchant_sf_id, vm.country_id,  vm.merchant_name_sf,
		vm.resp_employee_id, vm.main_category,
		vm.company_legal_name,
		emp.complete_name as "Owner_Name"
		,(Case when (count (vm.merchant_name_sf)in  (select merchant_name from sandbox.IL_inventory where inv.load_date > CURRENT_DATE -2 ))  >= 1 then 'TRUE' else 'FALSE'  end) as "Is_Live?"
FROM	dwh_base_sec_view.v_merchants_sf vm

join dwh_base_sec_view.v_employees as emp on emp.employee_id = vm.resp_employee_id
inner join sandbox.IL_inventory as inv on inv.merchant_name = vm.merchant_name_sf and inv.load_date > (CURRENT_DATE -2) 
where vm.country_id = 109

I get an error on the case line, for the operator >=
 
Any ideas?
 
Thanks :-)

Teradata Syntax Trouble - response (10) by dnoeth

$
0
0

Well, that's simply no valid SQL, I don't get what you're trying to do :-)
Show the working query without that CASE and explain what you're trying to do...

Teradata Syntax Trouble - response (11) by nhoigal

$
0
0

Hi Dieter,
 
The base query (without the case), shows a list of Merchants.
With the CASE I'm trying to find the merchant's name in another list, to see if he is currently active.
The CASE is a sort of lookup using count, with a result of TRUE if the merchant is Live at the moment, or FALSE if merchant is inactive.
 
Here is the code in Teradata without the CASE
 

SELECT vm.merchant_sf_id, vm.country_id,  vm.merchant_name_sf,

vm.resp_employee_id, vm.main_category,

vm.company_legal_name,

emp.complete_name as "Owner_Name"

 

FROM dwh_base_sec_view.v_merchants_sf vm

 

join dwh_base_sec_view.v_employees as emp on emp.employee_id = vm.resp_employee_id

inner join sandbox.IL_inventory as inv on inv.merchant_name = vm.merchant_name_sf and inv.load_date > (CURRENT_DATE -2) 

where vm.country_id = 109
 

Teradata Syntax Trouble - response (12) by dnoeth

$
0
0

If "active" is based on "inv.load_date > (CURRENT_DATE -2)" then you already retrun only active merchants. You might remove this conditon from WHERE and use:
 

,Case when inv.load_date > CURRENT_DATE -2
      then 'TRUE' 
      else 'FALSE' 
 end as "Is_Live?"

Or maybe you need somthing like this, check if any row for a given merchant quaifies as "active"

,Case when max(inv.load_date)
           over (partition by vm.merchant_name_sf)  > CURRENT_DATE - 
      then 'TRUE' 
      else 'FALSE' 
 end as "Is_Live?"

 

Teradata Syntax Trouble - response (13) by nhoigal

$
0
0

Thanks, exactly what I was looking for :-)

TARA Backup Performance - forum topic by DannyChin

$
0
0

Are there any performance differences between running 1 backup job using 8 streams and 8 concurrent jobs using 1 stream?

Multiple sessions in Fastload - response (1) by cmedved

$
0
0

Fastload can only load one table per job. Increasing the sessions will generally increase the throughput of the load - the sessions can connect to multiple nodes to push data in parallel. All of the sessions are used to load the same table. The benefit of more sessions depends on the size of your system. The Multiload tool can load to multiple tables.
 
However, in general, you should use the newer TPT utilities (TPT Load, TPT Update). TPT Update is capable of loading to multiple tables.


TARA Backup Performance - response (1) by Kevin Leach

$
0
0

You need to be aware of performance tail. If you run 8 jobs each with 1 parallel stream and 6 complete quickly, you will have a tail of 2 long running single stream jobs.
It will likely be better to run each single job with 8 parallel streams to ensure parallelism all the way through.
We also mix and match based on expected runtime with shorter jobs getting single streams and longer jobs getting parallel streams.
Of course, you have to ensure parallel streams are well tuned. Is 2 really faster than 1?

M-load Error while executing script - forum topic by kumarvaibhav1992

$
0
0

Hi All,
 
When executing the below script for MLOADm getting the below error:
 
output:
$ ./multiload.sh
./multiload.sh: .LOGTABLE:  not found.
./multiload.sh[2]: .logon:  not found.
./multiload.sh[4]: .begin:  not found.
./multiload.sh[5]: .layout:  not found.
./multiload.sh[6]: 0403-057 Syntax error at line 6 : `(' is not expected.
 
======= Script Starts Here===============
Multiload.sh:
 
.logtable ETLT5.INFA_SOURCE12_LOG
.logon ttdbia/a0c9sx,blue@126;
drop table ETLT5.INFA_SOURCE12_ET
 drop table ETLT5.INFA_SOURCE12_UT
 drop table ETLT5.INFA_SOURCE12_UV
 drop table ETLT5.INFA_SOURCE12_WT
.begin import mload tables ETLT5.INFA_SOURCE12 SESSIONS 20;
.layout InputFile_layout;
 .field id * varchar(10);
 .field Name * varchar(20);
 .field country * varchar(30);
.dml label Table_InsertDML;
.insert into ETLT5.INFA_SOURCE12
 (
id
 ,Name
 ,country 
 
 )
 values
 (
:id
 :,Name
 :,country 
 );
.import infile /nas/infred/data/SrcFiles/fastload.txt
 format vartext  ','
 display errors
 nostop
 layout InputFile_Layout
 apply Table_InsertDML;
.end mload;
 .logoff;
 
Please help me in this .Thanks in Advance :)
 

M-load Error while executing script - response (1) by kumarvaibhav1992

M-load Error while executing script - response (2) by dnoeth

$
0
0

Each MLoad command must be preceded by a period and must end with a semicolon.
Each Teradata SQL command must not be preceded by a period and must end with a semicolon.

M-load Error while executing script - response (3) by kumarvaibhav1992

$
0
0

Thanx Dnoeth,
changed my script according to what you have mentioned but stiil facing the same errors.

Viewing all 545 articles
Browse latest View live


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