generating sequention number during mload - response (4) by M.Saeed Khurram
generating sequention number during mload - response (5) by ulrich
inmods can do that but would require additional programing - check the manuals
TPT job fails, Log refers to a completely seperate unrelated job - response (5) by jnevill
Fantastic! I greatly appreciate the help!
Numeric overflow - response (12) by jprakash025
need urgent help:
column data type is decimal(8,2),i was trying to insert below value
SELECT CAST(9159742.9700 AS NUMERIC(8,2)),i m getting numeric overfloe error.but before decimal i have only 7 digits
please help me
Numeric overflow - response (14) by M.Saeed Khurram
Hi Parkash,
The data type DECIMAL(8,2) means that the value can include total 8 digits, including the decimal digits.
for example, in this case you can only have 6 digits left to the decimal point :)
TTU for Linux - forum topic by boriscb
Hi,
I have downloaded the Teradata Express VM which runs on Linux. I am trying to get the TTU package for it but I cannot locate it. On the download page all I can see is the following:
TTU Windows Package
This Teradata Tools and Utilities (TTU) 14.10 package is the full collection of Teradata client tools for Windows.
This includes SQL Assistant, load & unload utilities, database management, administration and drivers, and much more to be used to connect to your Teradata Express database instance (downloaded separately). Installation is easy and simple using a Windows installer
Please, can someone let me know where I can get hold of the TTU installation for LINUX ?...
Thank you.
TTU for Linux - response (1) by M.Saeed Khurram
How to install GeoImportExport utility to Teradata ? - response (1) by ab185052
There is no installation set up for Teradata GeoImportExport tool.
Extract zip file and you will find geojni.dll add the new directory to PATH variable.
You will also find a java package com\teradata\geo, add the directory contains this to CLASSPATH variable.
Alternately while executing you can include the same in -classpath variable as shown below.
I am here presenting example to run Export and Import samples.
===============================================================
TDGeoExport Demonstration
===============================================================
1. Create a table of geospatial data in the database
DROP TABLE stores;
CREATE TABLE customers(pkey integer, loc ST_Geometry, cust_name VARCHAR(120), cust_zipcode VARCHAR(5));
INSERT INTO customers(0, new ST_Geometry(POINT(20.34 80.78)), Fred Smith, 91234);
INSERT INTO customers(1, new ST_Geometry(POINT(20.56 89.44)), Richard Connor, 95421);
INSERT INTO customers(2, new ST_Geometry(POINT(19.12 88.22)), Anita Johnson, 98523);
INSERT INTO customers(3, new ST_Geometry(POINT(21.45 88.12)), Mary Willow, 90642);
SELECT * FROM customers ORDER BY 1;
2. Run TDGeoExport to create an ESRI shapefile from the customers table.
rm c:\temp\geodata\*
cd c:\temp\TdGeoImportExport\bin You should extract files sent in zip file under this directory.
java -Xms256m -Xmx1024m -classpath .;terajdbc4.jar;tdgssjava.jar;tdgssconfig.jar; com.teradata.geo.TDGeoExport -l geodb/geouser,geouser -s test -t customers -f ESRI Shapefile point -o c:\temp\geodata -n customers
3. Validate that the ESRI shape files were generated in the c:\temp\geodata directory
The output ESRI shape files will show up in c:\temp\geodata
Options for TDGeoSpatial Export tool:
-l logon_string: the Teradata Database logon string, where the format of logon_string is: Database/User,Password
-s database_name: the database name that contains the table to convert
-t table_name: the table name (or view) to convert
-f format_name: Output file format name. The possible values are as follows:
-f ESRI Shapefile shape_type [only]
-f TIGER version_code
-f MapInfo File
-f KML
-o output_directory_name: the directory where the output data files will be generated
-n layer_name: the name of the layer to create (defaults to the table name)
-a_srs coordinate_system_name: the coordinate system for exported geospatial data.
===============================================================
TDGeoImport Demonstration
===============================================================
1. Drop the customers table from the database
DROP TABLE customers;
2. Run TDGeoImport to import the ESRI shape files into the DBS.
cd c:\temp\TdGeoImportExport\bin You should extract files sent in zip file under this directory.
java -Xms256m -Xmx512m -classpath .;terajdbc4.jar;tdgssjava.jar;tdgssconfig.jar; com.teradata.geo.TDGeoImport -l geodb/geouser,geouser-s test -f c:\temp\geodata -n customers
3. Validate that shape files were loaded into customers table
SEL pkey, point (FORMAT X(20)), cust_name (FORMAT X(20)), cust_zipco FROM customers ORDER BY 1;
-l logon_string: the Teradata Database logon string, where the format of logon_string is: Database/User,Password
-s database_name: the database name where the data will be imported to
-f data_source_name: file or directory with the data files
-m: If present, tables imported to will be MULTISET; if NOT, tables will be SET
-n layer_name: the name of the layer to import. If not present, all layers in the data source will be imported.
-c char_mapping: a text file containing a mapping of illegal characters found in the data source to legal characters for the database.
The file should contain one entry per line in the form: illegal_character = legal_character
-k keyword_mapping: a text file containing a mapping of illegal keywords found in the data source to legal keywords for the database.
The file should contain one entry per line in the form: illegal_keyword = legal_keyword
-p primary_index_mapping: a text file containing a mapping of user defined primary indexes for a certain layer.
The file should contain one entry per line in the form: layer_name = primary_index
-a_srs coordinate_system: the coordinate system for imported geospatial data.
Note that no transform is performed, the SRID of the GeoSpatial field is set to the value of this parameter.
-FLOAD load_type: 0 = fastLoad off; 1 = fastLoad on; 2= fastload on, logging on. If not presemt, fastload is set to ON.
-BSIZE rows_in_batch: number of bytes of data in a batch insert. If not present, 30000000 bytes of data are in a batch insert.
Note: You should install java jdk (1.6) on your machine.
c:\temp\TdGeoImportExport\bin\java -version
java version 1.6.0_41
Please do let me know if you find any issues in using the application.
Numeric overflow - response (15) by jprakash025
thanks khurram
TTU for Linux - response (2) by jdliau
Can TTU run on other flavors of Linux such as Debian or Ubuntu?
Error during Teradata Plug-in for Eclipse Installation - response (3) by javaking2013
This happens when you try to install the eclipse plugin in SE. You have to use Enterprise Edition. I tried with both and it worked with EE and got this exact same error with SE. Download and install the correct version explained in http://developer.teradata.com/tools/articles/getting-started-with-teradata-plug-in-for-eclipse
TTU for Linux - response (3) by M.Saeed Khurram
Hi jdliau,
I believe Ubunto is a variant of Linux, so the utlities for Linux must be working for Ubunto. You can give it a try, I hope they will be working.
TPT with UDF. - forum topic by indrajit_td
ERROR:
----------------
TPT_INFRA: TPT02092: Error: Invalid single-byte character: (
TPT_INFRA: TPT02932: Error: Invalid token near line 138 (text was '"(CASE WHEN VALUE_TYPE = ''R'' THEN SYSLIB.PTY_FLOATENC (CAST (VAL AS FLOAT),''TDM'',32,1,4) ELSE NULL END)"')
TPT_INFRA: TPT02092: Error: Invalid single-byte character: (
TPT_INFRA: TPT02932: Error: Invalid token near line 139 (text was '"(CASE WHEN VALUE_TYPE = ''C'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',112,1,5) ELSE NULL END)"')
TPT_INFRA: Semantic error at or near line 119 of Job Script File '/export/home1/edwwher/tmp//GEADW_TDM_ETL1100024.ctl':
TPT_INFRA: TPT03107: Operator 'STREAM_OPERATOR' has explicit input schema. Restricted APPLY
statement allows only deferred schema for consumer operators.
TPT_INFRA: Semantic error at or near line 119 of Job Script File '/export/home1/edwwher/tmp//GEADW_TDM_ETL1100024.ctl':
TPT_INFRA: TPT03111: Rule: Restricted APPLY Statement
TPT_INFRA: TPT02092: Error: Invalid single-byte character: (
TPT_INFRA: TPT02932: Error: Invalid token near line 140 (text was '"(CASE WHEN VALUE_TYPE = ''I'' THEN SYSLIB.PTY_INTEGERENC(CAST (VAL AS INTEGER),''TDM'',16,1,8) ELSE NULL END)"')
TPT_INFRA: TPT02092: Error: Invalid single-byte character: (
TPT_INFRA: TPT02932: Error: Invalid token near line 141 (text was '"(CASE WHEN VALUE_TYPE = ''H'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',16,1,6) ELSE NULL END)"')
TPT_INFRA: TPT02092: Error: Invalid single-byte character: (
TPT_INFRA: TPT02932: Error: Invalid token near line 142 (text was '"(CASE WHEN VALUE_TYPE = ''E'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',16,1,7) ELSE NULL END)"')
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
Hello,
We have been trying to use a FUNCTION defiend to encrypt the data while loading to be used in TPT. Earlier we have done the same thing using MLOAD and it has been running fine. But when we call the FUNCTION in TPT it is giving us errors:
CODE:
--------
USING CHARACTER SET ASCII
DEFINE JOB ld_TDM_PARAM_LIVE_DEV_SSTABLE_FROM_FILE
DESCRIPTION 'LOAD ld_TDM_PARAM_LIVE_DEV_SS TABLE FROM A FILE'
(
DEFINE SCHEMA ld_TDM_PRM_LV_DV_SS_SCHEMA
DESCRIPTION 'TABLE ld_TDM_PARAM_LIVE_DEV_SS SCHEMA'
(
"FILE_INDX" VARCHAR(50)
, "SCAN_NO" VARCHAR(50)
, "PARAM" VARCHAR(259)
, "VAL" VARCHAR(503)
, "VALUE_TYPE" VARCHAR(13)
, "UNIT" VARCHAR(503)
, "TEST_PARAM_RESULT_VALUE" VARCHAR(32)
, "TEST_PARAM_RESULT_ASCII" VARCHAR(112)
, "TEST_PARAM_RESULT_INTEGER" VARCHAR(16)
, "TEST_PARAM_RESULT_HEX" VARCHAR(32)
, "TEST_PARAM_RESULT_EXCEPN_HEX" VARCHAR(32)
);
DEFINE OPERATOR DDL_OPERATOR()
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER DDL OPERATOR'
TYPE DDL
ATTRIBUTES
(
VARCHAR PrivateLogName = 'ld_TDM_PRM_LV_DV_SS_DDL',
VARCHAR TdpId = @tdpid,
VARCHAR UserName = @UserName,
VARCHAR UserPassword = @UserPassword,
VARCHAR AccountID,
VARCHAR ErrorList = '3807'
);
DEFINE OPERATOR STREAM_OPERATOR()
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER STREAM OPERATOR'
TYPE STREAM
SCHEMA ld_TDM_PRM_LV_DV_SS_SCHEMA
ATTRIBUTES
(
INTEGER MaxSessions = 4,
INTEGER MinSessions = 1,
VARCHAR TargetTable = 'GEADW_TDM_S.ld_TDM_PARAM_LIVE_DEV_SS',
VARCHAR TdpId = @tdpid,
VARCHAR UserName = @UserName,
VARCHAR UserPassword = @UserPassword,
VARCHAR AccountId,
VARCHAR ErrorTable1 = 'GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_E1',
VARCHAR ErrorTable2 = 'GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_E2',
VARCHAR WorkTable = 'GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_WT',
VARCHAR LogTable = 'GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_LT'
);
DEFINE OPERATOR FILE_READER()
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER DATA CONNECTOR OPERATOR'
TYPE DATACONNECTOR PRODUCER
SCHEMA ld_TDM_PRM_LV_DV_SS_SCHEMA
ATTRIBUTES
(
VARCHAR PrivateLogName='DCLog',
VARCHAR ArchiveDirectoryPath = @ArchiveDirectoryPath,
VARCHAR OpenMode = @OpenMode,
VARCHAR DirectoryPath = @DirectoryPath,
VARCHAR IndicatorMode = @IndicatorMode,
INTEGER VigilWaitTime = @VigilWaitTime,
INTEGER VigilElapsedTime = @VigilElapsedTime,
VARCHAR Format = @Format,
VARCHAR TextDelimiter = @TextDelimiter,
VARCHAR FileName = '*params.txt',
VARCHAR acceptexcesscolumns=@acceptexcesscolumns,
VARCHAR acceptmissingcolumns=@acceptmissingcolumns,
VARCHAR TruncateColumns=@TruncateColumns,
VARCHAR RowErrFileName=@RowErrFileName
);
STEP setup_tables
(
APPLY
('DROP TABLE GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_E1;'),
('DROP TABLE GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_E2;'),
('DROP TABLE GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_WT;'),
('DROP TABLE GEADW_TDM_S.ld_TDM_PRM_LV_DV_SS_LT;')
TO OPERATOR (DDL_OPERATOR () );
);
STEP load_data_to_table
(
APPLY
(
'INSERT INTO GEADW_TDM_S.ld_TDM_PARAM_LIVE_DEV_SS
(
:FILE_INDX
, :SCAN_NO
, :PARAM
, :TEST_PARAM_RESULT_VALUE
, :TEST_PARAM_RESULT_ASCII
, :TEST_PARAM_RESULT_INTEGER
, :TEST_PARAM_RESULT_HEX
, :TEST_PARAM_RESULT_EXCEPN_HEX
, :VALUE_TYPE
, :UNIT
);'
)
TO OPERATOR ( STREAM_OPERATOR () [1] )
SELECT
"FILE_INDX"
, "SCAN_NO"
, "PARAM"
, "(CASE WHEN VALUE_TYPE = ''R'' THEN SYSLIB.PTY_FLOATENC (CAST (VAL AS FLOAT),''TDM'',32,1,4) ELSE NULL END)"
, "(CASE WHEN VALUE_TYPE = ''C'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',112,1,5) ELSE NULL END)"
, "(CASE WHEN VALUE_TYPE = ''I'' THEN SYSLIB.PTY_INTEGERENC(CAST (VAL AS INTEGER),''TDM'',16,1,8) ELSE NULL END)"
, "(CASE WHEN VALUE_TYPE = ''H'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',16,1,6) ELSE NULL END)"
, "(CASE WHEN VALUE_TYPE = ''E'' THEN SYSLIB.PTY_VARCHARLATINENC(VAL,''TDM'',16,1,7) ELSE NULL END)"
, "VALUE_TYPE"
, "UNIT"
FROM OPERATOR (FILE_READER() [1] );
);
);
Sorry for the format but I was unable to paste it propeprly here.
SQL Assistant 12.0 - response (4) by s@ir@m
which OS you are using currently ?
SQL Assistant 12.0 - response (5) by M.Saeed Khurram
Hi Surabhi,
if you have installed TD Express 13.0, even then you can install latest TTU available on the below link and it will be working fine. I am also using this.
http://downloads.teradata.com/download/tools/teradata-tools-and-utilities-windows-installation-package
If you have any specific requirement to use 13.0, then you can get it from Teradata software server.
TPT SelectStmt - response (2) by Dhana
Has anyone tried multi line sqls in SELECTSTMT.? an working example would be grateful.
TPT SelectStmt - response (3) by feinholz
We strip newlines from within the requests so it should not be a problem.
(I have seen SELECT requests in TPT scripts that span pages.)
TPT with UDF. - response (1) by feinholz
The SELECT clause of the APPLY-SELECT statement is supposed to contain column names.
There are several issues with the script:
1. You enclosed the CASE logic in double-quotes, which is being interpreted as the name of the column (and you have embedded quotes within quotes, which may not be working either).
2. You are trying to direct these function calls to a file reader, which will not work.
It is not clear what you are trying to attempt.
If you would provide the corresponding MultiLoad script, I can take a look and see if we can figure out how to get this to work for you.
How to load Chinese Character in Mainframe(Zos) by using mload? - response (4) by Akarsh Verma
Hi,
Possible Reason/Solution - Chinese data cannot be represented in usual EBCDIC. you would require the input to be Unicode either UTF-8 or UTF-16 to successfully have the data in chinese in the Tables. You will also require to define the charset as UTF-8 (if you are providing UTF-8 File).
Moreoever you will have to see what Version of Teradata you are running because the one we use does not accepts UTF-16 directly for Channel attached system(Mainframes). Only UTF-8 is acceptable.
TPT (14.00), executing tbuild causes underlying UNIX machine to crash - forum topic by mushtaqilyas
Hi All,
I am at a site and have DataStage invoking a TPT script via a shell script on a UNIX AIX machine.
As soon as the tbuild command is executed, all remote network connectivity to the UNIX AIX machine is lost. The system administrator complains of a system reboot.
The Teradata Tools version is 14.00.
I have been able to run the very same tpt script locally from my windows machine that has a TPT version 14.00 as well.
Any clues?
Regards,
Mushtaq Ilyas
hi,
Can you please exaplian a little what do you want to achieve? I have done such work in one of my projects using TPT.
Give me some more explaination and I hope we can find a way.