extensibility
Algorithmic Compression Test Package
Version: 1.0.0.2 - Created: 12 Nov 2010
The ALC (ALgorithmic Compression) test package contains UDFs simulating TD13.10 built-in compression functions, test templates for Latin and Unicode character columns and step-by-step instructions. It is intended for TD users to run over specific data at column level to determine compression rates of TD 13.10 built-in compression algorithms. The test results provide information for selecting an appropriate algorithm for specific data. These tests use read-only operations and they can be executed on any release that supports UDFs (V2R6.2 & forward). It is recommended to run these tests off peak hours - they will use a significant amount of system resources (CPU bound). Usage To learn how to install and use the test package, please see Selecting an ALC compression algorithm. For community support for this package, please visit the Extensibility forum.
Teradata SQLRestrictedWords UDF Package
Version: 1.0 - Created: 07 Jun 2010
Starting from TD 13.10, Teradata DIPUDT script creates the SQLRestrictedWords_TBF function and the SQLRestrictedWords view in the SYSLIB database that allow users and client products to query for Teradata SQL Restricted words. For previous releases, we provide this package online for you to download and install the same table function and create view for the specific release of your server. Please start by reading the README (also included in the download package). For community support for UDFs, please visit the Extensibility forum. README ****************** * * * Introduction * * * ****************** Starting from TD 13.10, Teradata Database has a new feature that allows users and client products to query Teradata Restricted words. It requires running DIPUDT or DIPALL to get the feature enabled, i.e., to get a table UDF SYSLIB.SQLRestrictedWords_TBF installed and a view SYSLIB.SQLRestrictedWords created, and to grant appropriate access rights to users. For previous releases, we provide this UDF package online for you to download and install the same table function and create view for the specific release of your DB server. The following instructions guide you to do so step by step. ================================================================================= Step 1 Install table function SYSLIB.SQLRestrictedWords_TBF() ============================================================================= Step 1.1 Open the package and extract all files to c:/temp in your client machine from which you will run bteq. ============================================================================= Step 1.2 Go to folder c:/temp/udfrestrictedwords/, you will see folders for different operating systems: linux, mpras, win32 and win64; go to the folder that is the same as your DB server OS, you will see the UDF object file: udfsqlrestrcitedwords.o. ============================================================================= Step 1.3 Start BTEQ from the above folder, logon as DBC and run the following REPLACE FUNCTION script to install the table UDF. REPLACE FUNCTION SYSLIB.SQLRestrictedWords_TBF () RETURNS TABLE ( restricted_word VARCHAR(30) CHARACTER SET LATIN, release_introduced CHAR(5) CHARACTER SET LATIN, release_dropped CHAR(5) CHARACTER SET LATIN, category CHAR(1) CHARACTER SET LATIN, ANSI_restricted CHAR(1) CHARACTER SET LATIN) LANGUAGE C NO SQL DETERMINISTIC PARAMETER STYLE SQL EXTERNAL NAME 'CO!udfsqlrestrictedwords!udfsqlrestrictedwords.o'; You can ignore: "*** Warning: 5607 Check output for possible warnings encountered in compiling and/or linking UDF/XSP/UDM/UDT." ============================================================================= Step 1.4 Verify the table UDF is installed correctly. HELP FUNCTION SQLRestrictedWords_TBF (); sel count(*) from table (SQLRestrictedWords_TBF()) as t1; ================================================================================= Step 2 Create view SYSLIB.SQLRestrictedWords for specific release of your DB server over table function SYSLIB.SQLRestrictedWords_TBF() If your server is of TD 13.0 release, run: CREATE VIEW SYSLIB.SQLRestrictedWords AS SELECT restricted_word, category, ANSI_restricted FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '13.00' AND (release_dropped IS NULL OR release_dropped > '13.00'); If your server is of TD 12.0 release, run: CREATE VIEW SYSLIB.SQLRestrictedWords AS SELECT restricted_word, category, ANSI_restricted FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '12.00' AND (release_dropped IS NULL OR release_dropped > '12.00'); If your server is of TD 6.2 release, run: CREATE VIEW SYSLIB.SQLRestrictedWords AS SELECT restricted_word, category, ANSI_restricted FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '06.02' AND (release_dropped IS NULL OR release_dropped > '06.02'); ================================================================================= Step 3 Verify view SYSLIB.SQLRestrictedWords is created correctly. show view SYSLIB.SQLRestrictedWords; sel count(*) from SYSLIB.SQLRestrictedWords; ================================================================================= Step 4 Grant appropriate access rights to users grant execute function on syslib.SQLRestrictedWords_TBF to public; grant select on syslib.SQLRestrictedWords to public; ================================================================================= Step 5 Logon as a non-dbc user, verify non-dbc users can execute the table function and select from the view. HELP FUNCTION SQLRestrictedWords_TBF (); sel count(*) from table (SQLRestrictedWords_TBF()) as t1; show view SYSLIB.SQLRestrictedWords; sel count(*) from SYSLIB.SQLRestrictedWords; ****************** * * * Sample Usages * * * ****************** ================================================================================= 1 Get the Restricted Words list specific for the your DBS version Use the view directly: SELECT * FROM SYSLIB.SQLRestrictedWords; ================================================================================= 2 Get the Restricted Words list for specific versions using the table UDF Use the table UDF SQLRestrictedWords_TBF with conditions for the specific version in interest. For instances: ============================================================================== 2.1 Get all restricted words in TD 13.10: SELECT * FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '13.10' AND (release_dropped IS NULL OR release_dropped > '13.10'); ============================================================================== 2.2 Get all restricted words in TD 13.0: SELECT * FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '13.00' AND (release_dropped IS NULL OR release_dropped > '13.00'); ============================================================================== 2.3 Get all restricted words in TD 12.0: SELECT * FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '12.00' AND (release_dropped IS NULL OR release_dropped > '12.00'); ============================================================================== 2.4 Get all restricted words in TD 6.2: SELECT * FROM TABLE (SQLRestrictedWords_TBF()) as t1 WHERE release_introduced <= '06.02' AND (release_dropped IS NULL OR release_dropped > '06.02'); ****************** * * * NOTES * * * ****************** ================================================================================= Note 1: If you want to remove the table UDF and the view, you can run the following from DBC: DROP FUNCTION SYSLIB.SQLRestrictedWords_TBF (); DROP view SYSLIB.SQLRestrictedWords; ================================================================================= Note 2: If you drop the table UDF after you complete all steps and then re-install it following Step 1, you will also need to complete all the steps 2 ~ 4 in order to get the view and the table UDF working properly for non-dbc users.
Teradata Geospatial Import/Export Utilities 1.2
Version: 1.2 - Created: 06 Nov 2009
Teradata Geospatial Import/Export Utilities 1.1
Version: - Created: 02 Sep 2009
Teradata Geospatial Import/Export utilities for Windows and Linux. README Teradata TDGeoImportExport Release 1.1 for Teradata 13.0 Change History ========================================== Release 1.1 ----------- - Install directory changed from TDGeoImport to TDGeoImportExport - Added TDGeoExport to export geometries from the database Release 1.0 ----------- - Initial release Documentation ========================================================== Please see document B035-1181-098A, SQL Geospatial Types, for program documentation. Chapter 4, Data Loading and Formats describes TDGeoImport. A description of TDGeoExport is contained within this file Platforms ========================================================== This version of TDGeoImport/TdGeoExport runs on Windows 32-bit clients only. Software ========================================================== The Teradata Driver for the JDBC Interface on Windows must be installed. Example Run - TDGeoImport ========================================================== Assume an input file exists named co99_d00.shp in the directory c:\data\demo\load. Also assume that there is a user named geo_user and a database called mydb on a system called geo_system. Change to the TdGeoImportExport\bin directory and execute the following to load the layer named c099_d00 into the database: java -Xms256m -Xmx512m -classpath .;"c:\Program Files\Teradata\Tdat\LTDBMS\bin\terajdbc4.jar";"c:\Program Files\Teradata\Tdat\LTDBMS\bin\tdgssconfig.jar";. com.teradata.geo.TDGeoImport -l geo_system/geo_user,geo_pw -s mydb -f c:\data\demo\load -n co99_d00 Note that some large data files may exceed the Java Heap memory. In the above command, the -Xms option is used to set the initial Java heap size to 256MB. The -Xmx option is used to set the maximum Java heap size to 512MB. Example Run - TDGeoExport ========================================================== Assume a table named co99_d00 exists in the database mydb. It contains a column of type ST_Geometry. Also assume that there is a user named geo_user and a database called mydb on a system called geo_system. Change to the TdGeoImportExport\bin directory and execute the following to export the table to an ESRI shapefile named c099_d00 in the c:\data\demo\load directory. Note that this will overwrite any files of the same name in that directory: java -Xms256m -Xmx1024m -classpath .;"c:\Program Files\Teradata\Tdat\LTDBMS\bin\terajdbc4.jar";"c:\Program Files\Teradata\Tdat\LTDBMS\bin\tdgssconfig.jar";. com.teradata.geo.TDGeoExport -l geo_system/geo_user,geo_pw -s mydb -t co99_d00 -f "ESRI Shapefile" -o c:\data\demo\load -n co99_d00 Note that some large data files may exceed the Java Heap memory. In the above command, the -Xms option is used to set the initial Java heap size to 256MB. The -Xmx option is used to set the maximum Java heap size to 512MB. TDGeoExport Documentation ========================================================== TDGeoExport Data Export Program Purpose Convert geospatial data from the database into ESRI and TIGER/Line data. Syntax TDGeoExport -l logon_string -s database_name -t table_name -f format_name -o output_directory_name [-n layer_name] Where: -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" -f "TIGER" -f "MapInfo File" -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) Usage Notes The table or view should consist of a single geometry column of type ST_Geometry and one or more additional columns which represent the feature attributes. Each row of the table is considered a feature and the entire table is considered a layer. All columns in the table will be converted to the layer. If a subset of columns in the table is desired instead of the entire table, a view that represents this subset should be created. The program will place the output file(s) in the directory specified by the -o output_directory_name parameter. Restrictions There can be at most one geospatial column in the table. BLOB/CLOB columns and UDT columns other than the ST_Geometry column are not supported.
Teradata Geospatial Release 1.4
Version: - Created: 02 Sep 2009
The Teradata Geospatial Extension includes types, methods, functions, and utilities for loading, modeling, and analyzing spatial objects. README Teradata Geospatial Release 1.4 The Orange Book can be found in install\doc\Geospatial Orange Book.doc The open source libraries can be found in install\Open Source. Release 1.4 ----------- - TDGeoImport in releases prior to 1.4 did not support splitting large polygons with inner rings when the "-z 2" option was used. This restriction has been removed with release 1.4. The existing "-z 2" option will now split polygons/multipolygons with inner rings in them. - There was a bug where TDGeoImport may generate a geometry that is slightly too big, which would fail during the mload execution. This has been fixed. - Beginning in 1.3, AggGeomIntersection and AggGeomUnion would erroneously report an error if a MultiPolygon or MultiLineString were involved in the aggregation. This has been fixed. MultiPolygons and MultiLineStrings are supported in the union and intersection aggregate functions. Geometry collections are not supported, and an error will be reported if a geometry collection is passed to the aggregate function or if a geometry collection is produced during the execution of the aggregate function (e.g., union of a point and a linestring, which produces a geometry collection). Release 1.3 ----------- - Fixed a problem where the installation would fail if you unzipped the installation files into a Windows directory that contains spaces in the path name. ERRORWITHPATH would show up in the external name clause of CREATE FUNCTION statements. - Fixed a problem where you install the geospatial files onto a Linux system for the first time and it is unable to create the /home/tdatuser/geospatial/1.0 directory. The previous solution was to repeat the installation a second time. This is no longer necessary. - Fixed a problem where you may get a library not found error after adding additional UDTs/functions to the SYSUDTLIB database. A /etc/ld.so.conf.d/tdgeospatial.conf file was added so that ld can locate the libraries in /home/tdatuser/geospatial/1.0. - Fixed two problems in AggGeomUnion and AggGeomIntersection concerning NULL parameters passed to this functions and NULL geometry values. - The install will now abort with an error message if you try to install this on an invalid platform/DBS version. Supported versions include: MP-RAS (6.x and greater), Windows (6.x and 12.x), Linux (6.x and 12.x). Release 1.2 ----------- - Fixed failure in ST_Transform on Linux and MP-RAS platforms. Error message: Error in call to transform in ST_Point_Transform. This fix may also prevent lib rev errors after a DBS restart. - Fixed performance bug on MP-RAS when SpheroidalDistance is called on two points that are at the same location. Release 1.1 ----------- - Added SpheroidalDistance functions - Fixed missing libraries for SLES10 and Windows 64-bit installation Release 1.0 ----------- - Original release