Quantcast
Channel: Teradata Downloads - Tools
Viewing all 870 articles
Browse latest View live

Mload - execute a file in batch mode, invalid statement was found

$
0
0

Greetings Experts,
I am using windows 7, TD 13.0 express demo version on my laptop.  I have created the sample Mload file in C:\mload_in.txt which is below.

.LOGTABLE SAMPLES.ML_ITEMPPI;
.logon localtd/tduser,tduser;

.begin import mload tables samples.itemppi;
--errortables samples.ET_ITEMPPI SAMPLES.UV_ITEMPPI SAMPLES.WT_ITEMPPI;

.LAYOUT DATA_LAYOUT;
.field L_ORDERKEY * INTEGER;
.field L_PARTKEY * INTEGER; 
.field L_QUANTITY * DECIMAL (15,2); 
.field L_LINESTATUS * CHAR(1); 
.field L_SHIPDATE * DATE;

.dml label insert_itemppi;
insert into samples.itemppi.*;
-- values (:L_ORDERKEY, :L_PARTKEY, :L_QUANTITY, :L_LINESTATUS, :L_SHIPDATE);

.import infile "C:\itemppi_data.txt"
format fastload
layout data_layout
apply insert_itemppi;
.end mload;

.logoff;

 
When I click on Mload utility and type
mload < C:\mload_in.txt
it is showing the error message 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."

 

Also tried to use the following command, resulting in the same error

mload -r '.RUN FILE C:\mload_in.txt;'

 

how to execute the above file in batch mode?

 

I also tried to execute the same mload statements in bteqwin with no luck.  Error message is

"*** Failure 3707 Syntax error, expected something like a name or a Unicode 

 delimited identifier between the 'mload' keyword and '<'."

 

Forums: 

Teradata Parallel Transporter - queries

$
0
0

Hi

 

I am using Teradata Parallel Transporter v13.10. I have few questions in this regard.

 

1. In MLOAD LAYOUT we can define .FILLER, which will not be sent to database. Can we define anything similar in TPT UPDATE also?

 

 

2. Running the following DDL step.

 

STEP DDL_STEP3

(

APPLY ('CREATE MULTISET TABLE DBNAME.SAMPLE2, NO FALLBACK (COL1 INTEGER NOT NULL,COL2 VARCHAR(20),COL3 DATE) PRIMARY INDEX(COL1) 

PARTITION BY RANGE_N(COL3 BETWEEN DATE '1980-01-01' AND DATE '2005-12-31' EACH INTERVAL '1' YEAR, NO RANGE) ; ')

TO OPERATOR (DDL_OPERATOR) ;

)

;

 

It is giving me error, '1980-01-01' missing RPAREN_ in rule. Can't we create a PPI table like the above using DATE ranges by TPT DDL operator?

 

 

 

3. Running the following TPT UPDATE script.

 

DEFINE JOB TPT_UPDATE_INSERT

DESCRIPTION 'TPT UPDATE OPERATOR TO INSERT DATA'

(

 

DEFINE SCHEMA SAMPLE1

(

C1 VARCHAR(10),

C2 VARCHAR(20)

)

;

 

STEP UPDATE_STEP

(

APPLY ('INSERT INTO DBNAME.SAMPLE1 VALUES (:C1, :C2) ') 

TO OPERATOR 

(

UPDATE_OPERATOR

TYPE UPDATE

SCHEMA *

ATTRIBUTES

(

VARCHAR PRIVATELOGNAME = 'UPDATE_LOG.txt',

VARCHAR LOGONMECH = 'LDAP',

VARCHAR TDPID = 'xxx',

VARCHAR USERNAME = 'yyy',

VARCHAR USERPASSWORD = 'zzz',

VARCHAR LOGTABLE = 'DBNAME.SAMPLE1_LOG',

VARCHAR TARGETTABLE = 'DBNAME.SAMPLE1',

VARCHAR ERRORTABLE1 = 'DBNAME.SAMPLE1_ET',

VARCHAR ERRORTABLE2 = 'DBNAME.SAMPLE1_UV',

VARCHAR WORKINGDATABASE = 'DBNAME'

)

)

SELECT * FROM 

OPERATOR

(

FILE_READER

TYPE DATACONNECTOR PRODUCER

SCHEMA SAMPLE1

ATTRIBUTES

(

VARCHAR PRIVATELOGNAME = 'FILE_READER_LOG.txt',

VARCHAR DIRECTORYPATH = 'C:\SAMPLE',

VARCHAR FILENAME = 'MLOAD_SAMPLE1.csv',

VARCHAR FORMAT = 'DELIMITED',

VARCHAR TEXTDELIMITER = ','

)

)

;

)

;

)

;

 

It is giving error, Operator 'UPDATE_OPERATOR' is undefined. Can't we define operators like this?

 

Responses from experts are appriciated.

 

Thanking You

Santanu Ghosh

Forums: 

Teradata Parallel Transporter - queries

$
0
0

Hi

 

I am using Teradata Parallel Transporter v13.10. I have few questions in this regard.

 

1. In MLOAD LAYOUT we can define .FILLER, which will not be sent to database. Can we define anything similar in TPT UPDATE also?

 

 

2. Running the following DDL step.

 

STEP DDL_STEP3

(

APPLY ('CREATE MULTISET TABLE DBNAME.SAMPLE2, NO FALLBACK (COL1 INTEGER NOT NULL,COL2 VARCHAR(20),COL3 DATE) PRIMARY INDEX(COL1) 

PARTITION BY RANGE_N(COL3 BETWEEN DATE '1980-01-01' AND DATE '2005-12-31' EACH INTERVAL '1' YEAR, NO RANGE) ; ')

TO OPERATOR (DDL_OPERATOR) ;

)

;

 

It is giving me error, '1980-01-01' missing RPAREN_ in rule. Can't we create a PPI table like the above using DATE ranges by TPT DDL operator?

 

 

 

3. Running the following TPT UPDATE script.

 

DEFINE JOB TPT_UPDATE_INSERT

DESCRIPTION 'TPT UPDATE OPERATOR TO INSERT DATA'

(

 

DEFINE SCHEMA SAMPLE1

(

C1 VARCHAR(10),

C2 VARCHAR(20)

)

;

 

STEP UPDATE_STEP

(

APPLY ('INSERT INTO DBNAME.SAMPLE1 VALUES (:C1, :C2) ') 

TO OPERATOR 

(

UPDATE_OPERATOR

TYPE UPDATE

SCHEMA *

ATTRIBUTES

(

VARCHAR PRIVATELOGNAME = 'UPDATE_LOG.txt',

VARCHAR LOGONMECH = 'LDAP',

VARCHAR TDPID = 'xxx',

VARCHAR USERNAME = 'yyy',

VARCHAR USERPASSWORD = 'zzz',

VARCHAR LOGTABLE = 'DBNAME.SAMPLE1_LOG',

VARCHAR TARGETTABLE = 'DBNAME.SAMPLE1',

VARCHAR ERRORTABLE1 = 'DBNAME.SAMPLE1_ET',

VARCHAR ERRORTABLE2 = 'DBNAME.SAMPLE1_UV',

VARCHAR WORKINGDATABASE = 'DBNAME'

)

)

SELECT * FROM 

OPERATOR

(

FILE_READER

TYPE DATACONNECTOR PRODUCER

SCHEMA SAMPLE1

ATTRIBUTES

(

VARCHAR PRIVATELOGNAME = 'FILE_READER_LOG.txt',

VARCHAR DIRECTORYPATH = 'C:\SAMPLE',

VARCHAR FILENAME = 'MLOAD_SAMPLE1.csv',

VARCHAR FORMAT = 'DELIMITED',

VARCHAR TEXTDELIMITER = ','

)

)

;

)

;

)

;

 

It is giving error, Operator 'UPDATE_OPERATOR' is undefined. Can't we define operators like this?

 

Responses from experts are appriciated.

 

Thanking You

Santanu Ghosh

Forums: 

Teradata Utility Script

$
0
0

Hi
Someone told me, creating one teradata utility script within another is very handy.
For example, if I am writing a fastload script, I can put instructions to generate a fastexport script from fastload.
Does anyone have any example, or any document or web link where I can read about this.
 
Thanking You
Santanu Ghosh

Forums: 

Fast Export Error

$
0
0

Hi All,
I am newbie to TeraData. I ran the below code for FastExport:
.LOGTABLE jbhatt.example_log;
.LOGON 127.0.0.1/jbhatt,sample;
.BEGIN EXPORT;
.EXPORT OUTFILE example_export.dat;
sel top 10 * FROM samples;
.END EXPORT;
.LOGOFF;
 
I got the following output:
.LOGTABLE jbhatt.example_log;
 *** Error: Unrecognized command LOGTABLE
 Enter your logon or BTEQ command:
.LOGON 127.0.0.1/jbhatt,
 *** Logon successfully completed.
 *** Teradata Database Release is 14.00.05.02
 *** Teradata Database Version is 14.00.05.03
 *** Transaction Semantics are BTET.
 *** Session Character Set Name is 'ASCII'.
 *** Total elapsed time was 1 second.
 BTEQ -- Enter your SQL request or BTEQ command:
.BEGIN EXPORT;
 *** Error: Unrecognized command BEGIN
 BTEQ -- Enter your SQL request or BTEQ command:
.EXPORT OUTFILE example_export.dat;
 *** Syntax Error: Expected FILE or DDNAME keyword, not "OUTFILE".
 *** Warning: Extra text found after command.
              The text 'example_export....' not processed (ignored).
 BTEQ -- Enter your SQL request or BTEQ command:
sel top 10 * FROM samples;
 *** Query completed. 10 rows found. 18 columns returned.
 *** Total elapsed time was 1 second.
  S.No F_ID X_ID                         Z
-------------------- ----------- ---------------------------------------- -
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
              155133    16012000 ?                                        F
 BTEQ -- Enter your SQL request or BTEQ command:
.END EXPORT;
 *** Error: Unrecognized command END
 BTEQ -- Enter your SQL request or BTEQ command:
 *** Warning: EOF on INPUT stream.
.LOGOFF;
 *** You are now logged off from the DBC.
Please help me understand. where i am going wrong.... Thanks in Advance.

Forums: 

Data Caclulation (Number of Full Months and remaining Days between two dates)

$
0
0

I have a need to calculate the number of FULL Months and remaining days as two separate amounts.  The month is based on the day of the Month the date begins.  As an example 12/5/2013 to 1/4/2014 would be 1 month and 0 days.  Though 12/5/2013 to 1/6/2014 would be one month and 2 days.  Though 12/5/2013 to 1/3/2014 would be 0 months and 30 days.
Another good example is to use the dates of 2/20/2023 and 12/3/2002:  Want to calculate 242 months and 17 days.  I've been able to calculate this one accurately because the day from the larger date is also larger than the day of the earlier date.  This does NOT work well when the larger date has a smaller day number than the earlier date.  This produces a negative number of days.
The current SQL I'm using is as follows:
select a.cl_claim_number
,b.cl_disabled_date
,a.bd_begin_date
,a.bd_max_date
,(a.bd_max_date - a.bd_begin_date) month(4)
,extract (day from a.bd_max_date) - extract (day from a.bd_begin_date)
from polaris_p.bendates a
inner join polaris_p.claim b
on b.row_end_date is null
and b.cl_claim_number = a.cl_claim_number
and b.cl_terminate_date is null
where a.row_end_date is null
============================================
Example results are as follows:
1999-04-19     2018-08-08     232 months / -11 days     WANT 231 months / 19 days
2001-05-23     2016-05-19     180 months / - 4 days      WANT 179 months / 26 days
1998-08-02     2016-06-21     214 months / 19 days      OK
 

Forums: 

Convert HostData to actual record from Error Table

$
0
0

Hi,
We have some jobs loading data from TPT which creates ET for duplicate records.
Does anyone know how to convert Hostdata values into actual record from ET? I have limitations, can not user fastexport or Varbyte2Varchar UDF.
Does anyone has any idea or utility which can convert this Hex data into actual record? I tried different approaches to convert Hex to Text, but it seems it is not simple conversion.
 
Urgent help will be highly appreciated.

Forums: 

Two questions about Teradata PMON

$
0
0

Hi,
I have a two questions about teradata pmon. 
The first one is; what does monitor rates box shows? Why do we use it?
The second one is; when we open the session screen by clicking session button, there is an amp section under filter by box. What does it show?
Thanks.
 

Forums: 

Teradata Parallel Transporter ~ OPERATOR FILE_WRITER ~ escape characters in output

$
0
0

I needed to unload data from Teradata and escape certain characters.  For example some character strings contain a pipe symbol ('|') but I am using the pipe as my delimiter.   The documentation at http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/Load_and_Unload_Utilities/B035_2436_071A/2436ch03.078.09.html leads me to believe that if I specify EscapeTextDelimiter it should work.

...

  DEFINE OPERATOR FILE_WRITER
  TYPE DATACONNECTOR CONSUMER
  SCHEMA *
  ATTRIBUTES
  (
    VARCHAR PrivateLogName = 'dataconnector_log',
    VARCHAR DirectoryPath  = '${WorkDir}',
    VARCHAR FileName       = '${pipefilename}',
    VARCHAR Format         = 'Delimited',
    VARCHAR OpenMode       = 'Write',
    VARCHAR EscapeTextDelimiter  = '\',
    VARCHAR TextDelimiter  = '|'  )
  ;

  APPLY TO OPERATOR (FILE_WRITER)
  SELECT * FROM OPERATOR (EXPORT_OPERATOR);
)
;

 
It turns out that I needed to do the obvious, and "escape my escape" like this:

...

  DEFINE OPERATOR FILE_WRITER
  TYPE DATACONNECTOR CONSUMER
  SCHEMA *
  ATTRIBUTES
  (
    VARCHAR PrivateLogName = 'dataconnector_log',
    VARCHAR DirectoryPath  = '${WorkDir}',
    VARCHAR FileName       = '${pipefilename}',
    VARCHAR Format         = 'Delimited',
    VARCHAR OpenMode       = 'Write',
    VARCHAR EscapeTextDelimiter  = '\\',
    VARCHAR TextDelimiter  = '|'  )
  ;

 
 

Forums: 

BTEQ and the Commit statement

$
0
0

hello everyone, is there a method in BTEQ that I do not need to enter COMMIT after every action.. I have a very big script with full

of commands to perform..  when I do it SQL assistant it works.. and I had to enter all the commit statements... I think it could be something with Ansi or Teradata mode??? would appreciate some guidence..  thks Vince

 

.LOGON 2/XFAH;

DATABASE PROD_TABLE;

COMMIT WORK;

CREATE SET TABLE TACCT_CLSFN ,NO FALLBACK ,

  NO BEFORE JOURNAL,

  NO AFTER JOURNAL

  (      

   ACCT_CLSFN_CD        SMALLINT NOT NULL,

   ACCT_CLSFN_E_DESC    VARCHAR(25) CHARACTER SET LATIN NOT CASESPECIFIC,

   ACCT_CLSFN_F_DESC    VARCHAR(25) CHARACTER SET LATIN NOT CASESPECIFIC,

   EFF_DT               DATE NOT NULL,

   EXPY_DT              DATE)

UNIQUE PRIMARY INDEX ( ACCT_CLSFN_CD );

COMMIT WORK;

CREATE SET TABLE TIVR_ACD_NUMBER ,NO FALLBACK ,

  NO BEFORE JOURNAL,

  NO AFTER JOURNAL

  (      

   AUTO_CALL_DIST CHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,

   EFF_DT               DATE NOT NULL,

   ACD_NUMBER_E_DESC    VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC,

   ACD_NUMBER_F_DESC    VARCHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC,

   EXPY_DT              DATE)

UNIQUE PRIMARY INDEX ( AUTO_CALL_DIST, EFF_DT );

COMMIT WORK;

 

etc...

Forums: 

DEFINE SCHEMA target_schema FROM TABLE

$
0
0

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.

Forums: 

Skip header row of file using TDLoad

$
0
0

Hi
I need to load a flatfile into TD using tdload utility, but skip the header row while loading. Is it possible to skip the 1st row i.e Header and load the remaining lines.
Thanks
Manjeeth
 

Tags: 
Forums: 

TTU for solaris

$
0
0

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.

Forums: 

Can I perform Delete and Insert in the same trigger

$
0
0

Hi,
 
I have to create a trigger on table A so that whenever there is any insert or delete in table A, there should be same insert and Delete in Table B.
Please let me know if it is possible. If you can provide the syntax as well that will be great.
 
Thanks.

Forums: 

TPT Wizard datatype casting

$
0
0

Since I am new to teradata my DBA suggested to use TPT Wizard to export data from a teradata table to a flat file in | delimited format.
However I noticed that all columns needed to be varchar for this export using TPT. Even though I changed the TPT Type to varchar I am getting below error,

W_0_o_Test_Cast: TPT12108: Output Schema does not match data from SELECT statement

 

Here is the script it generated,

 

/* 1 */  

/* 2 */  

/* 3 */  DEFINE JOB Test_Cast

/* 4 */  DESCRIPTION 'Test_Cast'

/* 5 */  (

/* 6 */   DEFINE OPERATOR W_1_o_Test_Cast

/* 7 */   TYPE DATACONNECTOR CONSUMER

/* 8 */   SCHEMA *

/* 9 */   ATTRIBUTES

/* 10 */   (

/* 11 */   VARCHAR FileName, 

/* 12 */   VARCHAR Format, 

/* 13 */   VARCHAR OpenMode, 

/* 14 */   INTEGER BlockSize, 

/* 15 */   INTEGER BufferSize, 

/* 16 */   INTEGER RetentionPeriod, 

/* 17 */   INTEGER RowsPerInstance, 

/* 18 */   INTEGER SecondarySpace, 

/* 19 */   INTEGER UnitCount, 

/* 20 */   INTEGER VigilElapsedTime, 

/* 21 */   INTEGER VigilWaitTime, 

/* 22 */   INTEGER VolumeCount, 

/* 23 */   VARCHAR AccessModuleName, 

/* 24 */   VARCHAR AccessModuleInitStr, 

/* 25 */   VARCHAR DirectoryPath, 

/* 26 */   VARCHAR ExpirationDate, 

/* 27 */   VARCHAR IndicatorMode, 

/* 28 */   VARCHAR PrimarySpace, 

/* 29 */   VARCHAR PrivateLogName, 

/* 30 */   VARCHAR RecordFormat, 

/* 31 */   VARCHAR RecordLength, 

/* 32 */   VARCHAR SpaceUnit, 

/* 33 */   VARCHAR TextDelimiter, 

/* 34 */   VARCHAR VigilNoticeFileName, 

/* 35 */   VARCHAR VigilStartTime, 

/* 36 */   VARCHAR VigilStopTime, 

/* 37 */   VARCHAR VolSerNumber, 

/* 38 */   VARCHAR UnitType

/* 39 */   );

/* 40 */  

/* 41 */   DEFINE SCHEMA W_0_s_Test_Cast

/* 42 */   (

/* 43 */   REC_ADD_TS VARCHAR(26)

/* 44 */   );

/* 45 */  

/* 46 */   DEFINE OPERATOR W_0_o_Test_Cast

/* 47 */   TYPE EXPORT

/* 48 */   SCHEMA W_0_s_Test_Cast

/* 49 */   ATTRIBUTES

/* 50 */   (

/* 51 */   VARCHAR UserName, 

/* 52 */   VARCHAR UserPassword, 

/* 53 */   VARCHAR SelectStmt, 

/* 54 */   INTEGER BlockSize, 

/* 55 */   INTEGER MaxSessions, 

/* 56 */   INTEGER MinSessions, 

/* 57 */   INTEGER TenacityHours, 

/* 58 */   INTEGER TenacitySleep, 

/* 59 */   INTEGER MaxDecimalDigits, 

/* 60 */   VARCHAR AccountID, 

/* 61 */   VARCHAR DateForm, 

/* 62 */   VARCHAR NotifyExit, 

/* 63 */   VARCHAR NotifyExitIsDLL, 

/* 64 */   VARCHAR NotifyLevel, 

/* 65 */   VARCHAR NotifyMethod, 

/* 66 */   VARCHAR NotifyString, 

/* 67 */   VARCHAR PrivateLogName, 

/* 68 */   VARCHAR TdpId, 

/* 69 */   VARCHAR TraceLevel, 

/* 70 */   VARCHAR WorkingDatabase

/* 71 */   );

/* 72 */  

/* 73 */   APPLY

/* 74 */   TO OPERATOR

/* 75 */   (

/* 76 */   W_1_o_Test_Cast[1]

/* 77 */  

/* 78 */   ATTRIBUTES

/* 79 */   (

/* 80 */   FileName = 'C:\Documents and Settings\****\Desktop\Test\cast.txt', 

/* 81 */   Format = 'DELIMITED', 

/* 82 */   OpenMode = 'Write', 

/* 83 */   IndicatorMode = 'N', 

/* 84 */   TextDelimiter = '|'

/* 85 */   )

/* 86 */   )

/* 87 */   SELECT * FROM OPERATOR

/* 88 */   (

/* 89 */   W_0_o_Test_Cast[1]

/* 90 */  

/* 91 */   ATTRIBUTES

/* 92 */   (

/* 93 */   UserName = '****', 

/* 94 */   UserPassword = '****', 

/* 95 */   SelectStmt = 'SELECT REC_ADD_TS FROM TEST.Table;', 

/* 96 */   TdpId = 'Server'

/* 97 */   )

/* 98 */   );

/* 99 */  );

 

 

Any suggestions?

Forums: 

TPT Wizard datatype casting

$
0
0

Since I am new to teradata my DBA suggested to use TPT Wizard to export data from a teradata table to a flat file in | delimited format.
However I noticed that all columns needed to be varchar for this export using TPT. Even though I changed the TPT Type to varchar I am getting below error,

W_0_o_Test_Cast: TPT12108: Output Schema does not match data from SELECT statement

 

Here is the script it generated,

 

/* 1 */  

/* 2 */  

/* 3 */  DEFINE JOB Test_Cast

/* 4 */  DESCRIPTION 'Test_Cast'

/* 5 */  (

/* 6 */   DEFINE OPERATOR W_1_o_Test_Cast

/* 7 */   TYPE DATACONNECTOR CONSUMER

/* 8 */   SCHEMA *

/* 9 */   ATTRIBUTES

/* 10 */   (

/* 11 */   VARCHAR FileName, 

/* 12 */   VARCHAR Format, 

/* 13 */   VARCHAR OpenMode, 

/* 14 */   INTEGER BlockSize, 

/* 15 */   INTEGER BufferSize, 

/* 16 */   INTEGER RetentionPeriod, 

/* 17 */   INTEGER RowsPerInstance, 

/* 18 */   INTEGER SecondarySpace, 

/* 19 */   INTEGER UnitCount, 

/* 20 */   INTEGER VigilElapsedTime, 

/* 21 */   INTEGER VigilWaitTime, 

/* 22 */   INTEGER VolumeCount, 

/* 23 */   VARCHAR AccessModuleName, 

/* 24 */   VARCHAR AccessModuleInitStr, 

/* 25 */   VARCHAR DirectoryPath, 

/* 26 */   VARCHAR ExpirationDate, 

/* 27 */   VARCHAR IndicatorMode, 

/* 28 */   VARCHAR PrimarySpace, 

/* 29 */   VARCHAR PrivateLogName, 

/* 30 */   VARCHAR RecordFormat, 

/* 31 */   VARCHAR RecordLength, 

/* 32 */   VARCHAR SpaceUnit, 

/* 33 */   VARCHAR TextDelimiter, 

/* 34 */   VARCHAR VigilNoticeFileName, 

/* 35 */   VARCHAR VigilStartTime, 

/* 36 */   VARCHAR VigilStopTime, 

/* 37 */   VARCHAR VolSerNumber, 

/* 38 */   VARCHAR UnitType

/* 39 */   );

/* 40 */  

/* 41 */   DEFINE SCHEMA W_0_s_Test_Cast

/* 42 */   (

/* 43 */   REC_ADD_TS VARCHAR(26)

/* 44 */   );

/* 45 */  

/* 46 */   DEFINE OPERATOR W_0_o_Test_Cast

/* 47 */   TYPE EXPORT

/* 48 */   SCHEMA W_0_s_Test_Cast

/* 49 */   ATTRIBUTES

/* 50 */   (

/* 51 */   VARCHAR UserName, 

/* 52 */   VARCHAR UserPassword, 

/* 53 */   VARCHAR SelectStmt, 

/* 54 */   INTEGER BlockSize, 

/* 55 */   INTEGER MaxSessions, 

/* 56 */   INTEGER MinSessions, 

/* 57 */   INTEGER TenacityHours, 

/* 58 */   INTEGER TenacitySleep, 

/* 59 */   INTEGER MaxDecimalDigits, 

/* 60 */   VARCHAR AccountID, 

/* 61 */   VARCHAR DateForm, 

/* 62 */   VARCHAR NotifyExit, 

/* 63 */   VARCHAR NotifyExitIsDLL, 

/* 64 */   VARCHAR NotifyLevel, 

/* 65 */   VARCHAR NotifyMethod, 

/* 66 */   VARCHAR NotifyString, 

/* 67 */   VARCHAR PrivateLogName, 

/* 68 */   VARCHAR TdpId, 

/* 69 */   VARCHAR TraceLevel, 

/* 70 */   VARCHAR WorkingDatabase

/* 71 */   );

/* 72 */  

/* 73 */   APPLY

/* 74 */   TO OPERATOR

/* 75 */   (

/* 76 */   W_1_o_Test_Cast[1]

/* 77 */  

/* 78 */   ATTRIBUTES

/* 79 */   (

/* 80 */   FileName = 'C:\Documents and Settings\****\Desktop\Test\cast.txt', 

/* 81 */   Format = 'DELIMITED', 

/* 82 */   OpenMode = 'Write', 

/* 83 */   IndicatorMode = 'N', 

/* 84 */   TextDelimiter = '|'

/* 85 */   )

/* 86 */   )

/* 87 */   SELECT * FROM OPERATOR

/* 88 */   (

/* 89 */   W_0_o_Test_Cast[1]

/* 90 */  

/* 91 */   ATTRIBUTES

/* 92 */   (

/* 93 */   UserName = '****', 

/* 94 */   UserPassword = '****', 

/* 95 */   SelectStmt = 'SELECT REC_ADD_TS FROM TEST.Table;', 

/* 96 */   TdpId = 'Server'

/* 97 */   )

/* 98 */   );

/* 99 */  );

 

 

Any suggestions?

Forums: 

Obtaining Failed load records from TPT load

$
0
0

I understand that ErrorTable1 has my bad load records in it but how can I get them back out.
The DataParcel column is defined as : Entire data record, as provided by the source producer operator. 

When I use teradata SQL assistant and have it output the dataparcel to a file it appers to only be the leading lenght bytes and the column data in error.  

 

I need to write these records back out to a file, in a more automated fashion anyway.

 

I need to know which input records are causing load issues, so I can provide the creater of the file with specifics about the bad records.

 

How is this normally accomplished?

 

Thank you.

 

 

 

 
 

Forums: 

Teradata load "Batch is empty" error

$
0
0

Hi,
i have a "|" deleimeted file, and i use teradata studio express to do load using "teradata load" option.
i was able to load the file with data
row1|row2|row3|row4|row5 - it was sucess
but the below throws "batch is empty" error
row1|row2|row3|(row4|row5
If i removed the "(" i am able to load. so if the data starts with ( i am getting this error.
Can you please help me on this?

Forums: 

Parallel Load into Single Table - TPUMP / TPT

$
0
0

Hi All
We have a requirement where we need to load one single table in parallel from different source tables.
Say, TableX needs to be loaded from TableA, TableB and TableC. They have different source data (Rows).
This must happen at the same time during batch load, possibly using 3 different jobs. I can think of one way to use BTEQ INSERT/SELECT and ROWHASH Locking modifier or schedule the jobs accordingly in scheduler. 
I would like to know, whether it is possible by TPT STREAM or TPUMP using Serialize option or is there any other option in TD utilities ?
 
Thanking You
Santanu

Forums: 

TPT - Handling Delimited File with Embedded CR\LF in field

$
0
0

Hi,
I have a file which is comma delimited with fields in double quotes and some comment fields have embedded CR/LF within the fields. How do I preserve the CR\LF and load the file using TPT Load Operator? I keep getting the error - Delimited Data Parsing error: Too few columns in row nnnnn because it treats the CR\LF within the field as a new row.
Here are my varchar attributes set:

ATTRIBUTES

(

"FileName" = 'temp.csv', 

"Format" = 'DELIMITED', 

"OpenMode" = 'Read', 

"DirectoryPath" = 'C:\Users\xxxxx\Desktop', 

"IndicatorMode" = 'N', 

"TextDelimiter" = ',',

"CloseQuoteMark" = '"',

"OpenQuoteMark" = '"',

"QuotedData" = 'Y'

)

Forums: 
Viewing all 870 articles
Browse latest View live


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