0% found this document useful (0 votes)
41 views33 pages

Teradata Geospatial Utilities User Guide - 20.00

Uploaded by

pintadus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views33 pages

Teradata Geospatial Utilities User Guide - 20.00

Uploaded by

pintadus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Teradata® Tools and Utilities

Teradata® Geospatial Utilities


User Guide - 20.00
Release 20.00
October 2023

B035-2519-103K
DOCS.TERADATA.COM
Copyright and Trademarks
Copyright © 2014 - 2023 by Teradata. All Rights Reserved.
All copyrights and trademarks used in Teradata documentation are the property of their respective owners. See Trademark Information.

Third-Party Materials
Non-Teradata (i.e., third-party) sites, documents or communications (“Third-party Materials”) may be accessed or accessible (e.g., linked or
posted) in or in connection with a Teradata site, document or communication. Such Third-party Materials are provided for your convenience only
and do not imply any endorsement of any third party by Teradata or any endorsement of Teradata by such third party. Teradata is not responsible
for the accuracy of any content contained within such Third-party Materials, which are provided on an “AS IS” basis by Teradata. Such third party
is solely and directly responsible for its sites, documents and communications and any harm they may cause you or others.

Warranty Disclaimer
Except as may be provided in a separate written agreement with Teradata or required by applicable laws, all designs, specifications,
statements, information, recommendations and content (collectively, "content") available from the Teradata Documentation website
or contained in Teradata information products is presented "as is" and without any express or implied warranties, including, but not
limited to, the implied warranties of merchantability, fitness for a particular purpose, or noninfringement, which are hereby disclaimed.
In no event shall Teradata corporation, its suppliers or partners be liable for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or
otherwise) arising in any way out of the use of content, even if advised of the possibility of such damage.
The Content available from the Teradata Documentation website or contained in Teradata information products may contain references or
cross-references to features, functions, products, or services that are not announced or available in your country. Such references do not imply
that Teradata Corporation intends to announce such features, functions, products, or services in your country. Please consult your local Teradata
Corporation representative for those features, functions, products, or services available in your country.
The Content available from the Teradata Documentation website or contained in Teradata information products may be changed or updated
by Teradata at any time without notice. Teradata may also make changes in the products or services described in the Content at any time
without notice.
The Content is subject to change without notice. Users are solely responsible for their application of the Content. The Content does not constitute
the technical or other professional advice of Teradata, its suppliers or partners. Users should consult their own technical advisors before
implementing any Content. Results may vary depending on factors not tested by Teradata.

Machine-Assisted Translation
Certain materials on this website have been translated using machine-assisted translation software/tools. Machine-assisted translations of any
materials into languages other than English are intended solely as a convenience to the non-English-reading users and are not legally binding.
Anybody relying on such information does so at his or her own risk. No automated translation is perfect nor is it intended to replace human
translators. Teradata does not make any promises, assurances, or guarantees as to the accuracy of the machine-assisted translations provided.
Teradata accepts no responsibility and shall not be liable for any damage or issues that may result from using such translations. Users are reminded
to use the English contents.

Feedback
To maintain the quality of our products and services, e-mail your comments on the accuracy, clarity, organization, and value of this document
to: docs@teradata.com.
Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed nonconfidential. Without any
payment or other obligation of any kind and without any restriction of any kind, Teradata and its affiliates are hereby free to (1) reproduce, distribute,
provide access to, publish, transmit, publicly display, publicly perform, and create derivative works of, the Feedback, (2) use any ideas, concepts,
know-how, and techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing, and marketing products
and services incorporating the Feedback, and (3) authorize others to do any or all of the above.

Confidential Information
Confidential Information means any and all confidential knowledge, data or information of Teradata, including, but not limited to, copyrights, patent
rights, trade secret rights, trademark rights and all other intellectual property rights of any sort.
The Content available from the Teradata Documentation website or contained in Teradata information products may include Confidential
Information and as such, the use of such Content is subject to the non-use and confidentiality obligations and protections of a non-disclosure
agreement or other such agreements to protect Confidential Information that you have executed with Teradata.

Product Safety
Safety type Description
Indicates a situation which, if not avoided, could result in damage to property, such as to equipment or data, but not related to personal injury.
⚠ NOTICE

For hardware products only


⚠ CAUTION Indicates a hazardous situation which, if not avoided, could result in minor or moderate personal injury.

For hardware products only


⚠ WARNING Indicates a hazardous situation which, if not avoided, could result in death or serious personal injury.
Contents

Chapter 1: Teradata Geospatial Utilities Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4


Welcome to Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide . . . . . . . . . . . . . 4
Platform Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Compatibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Release Version Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Input/Output Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Chapter 2: Teradata GeoImport Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8


Teradata GeoImport Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Teradata GeoImport Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
TDGeoImport Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Chapter 3: Teradata GeoExport Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13


Teradata GeoExport Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Teradata GeoExport Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
TDGeoExport Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Chapter 4: Teradata Geospatial Utilities Demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Grant Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Create Table and Insert Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Executing TDGeoExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Executing TDGeoImport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Appendix A: Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 3
1
Teradata Geospatial Utilities Overview

Welcome to Teradata® Tools and Utilities Teradata®


Geospatial Utilities User Guide
Using the Geospatial Utilities
Teradata Geospatial Utilities load and export unstructured Shape file data into and out of tables in the
database. This document provides a thorough information about Teradata Geospatial Utilities, which
includes GeoImport and GeoExport utilities.

Why Would I Use this Content?


This document describes the features, functionalities and significant aspects of Teradata Geospatial Utilities
and its components - GeoImport and GeoExport utilities. To get a thorough understanding of the operational
impact of ODBC, users must go through the document. This document also describes:
• Teradata GeoImport Overview
• Teradata GeoExport Overview
• Teradata Geospatial Utilities Demonstration

How Do I Use this Content?


This document is intended for Application programmers. Use this content to get an idea about how to use
Teradata Geospatial Utilities from start to end. Read the Overview topics at the beginning of each section
in the guide.
You can also check the following sections:
• Release Version Compatibility
• Teradata GeoImport Process
• Teradata GeoExport Process

How Do I Get Started?


Start with the topics in the Teradata Geospatial Utilities Overview section to learn about the product,
prerequisites, and system requirements. Proceed to the respective section as per your requirements,
such as:
• Making the GDAL Library Available for Teradata GeoImport/GeoExport Utility
• Input/Output Data Formats
• Executing TDGeoExport
• Executing TDGeoImport

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 4
1: Teradata Geospatial Utilities Overview

References to Other Relevant Content


• For a more detailed description of the Vantage system components and their roles in processing input
and output, see Teradata Vantage™ - Database Introduction, B035-1091.

For the full list of supported platforms and product versions, see Teradata® Tools and Utilities
Compatibility Matrix (B035-3119).

Platform Compatibility
Platform 64-bit

Windows Yes

64-Bit
Teradata Geospatial Utility installs geojni.dll and tdgeospatial.jar under:
%PROGRAMFILES%\Teradata\Client\20.00\bin

Prerequisites
The following prerequisite knowledge is required for this product:
• Relational database management systems
• Shape file data like ESRI, TIGER, and KML
• Teradata FastLoad and CLOB data type
• Teradata Vantage

Compatibilities
You must install open source GDAL libraries in order to use Teradata Geospatial Utilities.

Obtaining Open Source GDAL Libraries


1. Download the GDAL installer file:

GDAL-Compiled
Action
Binaries

64-Bit a. Go to http://www.gisinternals.com/.
b. Click Archive Versions.
c. Under gdal-1-11-0-mapserver-6-4-1, click release-1600-x64-
gdal-1-11-0-mapserver-6-4-1 to download the 64-bit GDAL-
compiled binaries.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 5
1: Teradata Geospatial Utilities Overview

2. Update the PATH environment variable with the directory location where the GDAL-compiled binaries
have been copied.

Making the GDAL Library Available for Teradata GeoImport/


GeoExport Utility
Add GDAL libraries directory to the PATH environment variable so that Teradata GeoImport/GeoExport
Utility can access the dependent gdal111.dll library.

Release Version Compatibility


This document supports the following releases:
• Teradata Vantage™ 2.0
• Teradata Geospatial Utilities 20.00
• Teradata JDBC Driver 20.00
• Teradata GSS 20.00
• Teradata GSS Config 20.00
• GDAL open source library 1.11

For the most current information about Teradata® Tools and Utilities product versions, supported
operating systems, and supported Vantage versions, see Teradata® Tools and Utilities Compatibility Matrix
(B035-3119) at https://docs.teradata.com/.

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.
• The ST_Geometry column should be last column in the Table definition.

Operating Mode
Teradata Geospatial Utilities runs in interactive/batch mode.

Character Sets
Teradata Geospatial Utilities supports Default Character set (ASCII) and UTF8.

Input/Output Data Formats


Teradata Geospatial Utilities can export four types of data formats:
• TIGER

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 6
1: Teradata Geospatial Utilities Overview

• ESRI
• KML
• MAPINFO
Teradata Geospatial Utilities can import four types of data formats:
• TIGER
• ESRI
• MAPINFO
• ESRI File Geodatabase

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 7
2
Teradata GeoImport Utility

Teradata GeoImport Overview


Teradata GeoImport converts layers from ESRI, MapInfo, and TIGER/Line data sources and loads the data
into the database.
The figure shows data flow and component arrangement for Teradata GeoImport.

Teradata GeoImport Data Flow and Component Arrangement

Teradata GeoImport loads data from Shape files like TIGER, MAPInfo, ESRI, KML, and ESRI File
Geodatabase to the database. If the size of the row including the geometry column is less than 64 KB,
FastLoad protocol is used. Otherwise, LOB connection is used while loading data.

Teradata GeoImport Process


The following steps and examples describe how to import with the Teradata GeoImport utility.
1. Drop the customers table from the database:
DROP TABLE customers;
2. Run TDGeoImport to import the ESRI shape files into the database:
64-bit path:

cd c:\temp\TdGeoImportExport\bin
java -Xms256m -Xmx512m -classpath
.;"c:\Program Files\Teradata\Tdat\LTDBMS\bin\terajdbc4.jar";
"C:\Program Files\Teradata\Client\20.00\bin\tdgeospatial.jar";
com.teradata.geo.TDGeoImport -l hyvm20/ geouser, geouser -s geouser
-f c:\temp\geodata -n customers

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 8
2: Teradata GeoImport Utility

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;

TDGeoImport Command
Syntax

where:

-logmech logon_mechanism
Teradata Logon mechanism ,which determines the connection's authentication and
encryption capabilities (either TD2 (default) or LDAP).

-logdata log_data
Specifies additional data needed by a logon mechanism.

-l logon_string
Database logon string, where the format of logon_string is: Database/User,Password

-f data_source_name
File or directory with data files. Supports the following input file formats:
• ESRI Shapefiles
• MapInfo data sets in native TAB format
• U.S. Census Bureau TIGER/Line files

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 9
2: Teradata GeoImport Utility

-a_srs coordinate_system
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. Default is NAD83.

-BSIZE rows_in_batch
Number of bytes of data in a batch inserts.
If not present, 30000000 bytes of data are in a batch insert.

-c char_mapping
Text file containing a mapping of illegal characters found in data source to legal characters for
the database. The file should contain one entry per line in the form:
illegal_character => legal_character

Note:
Relative / exact path of file should be char_mapping.

Example:
Character Map File
$ => S
" " => ""

-FLOAD load_type
Specifies FastLoad used while logging to database or not.
0 = FastLoad off; FastLoad not used while logging to database.
1 = FastLoad on; FastLoad is used while logging to database.
2= FastLoad on, FastLoad used and logging option turned on.

-k keyword_map_file
Text file containing a mapping of illegal keywords found in data source to legal keywords for
the database. The file should contain one entry per line in the form:
illegal_keyword => legal_keyword

Note:
Relative / exact path of file should be keyword_mapping.

Example:

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 10
2: Teradata GeoImport Utility

Keyword Map File


FILE => _FILE
PRIVATE => _PRIVATE
PRECISION => _PRECISION
table => _table
select => _select
RTSQ => _myRTSQ

-m
If present, tables created will be MULTISET; if NOT, tables will be SET.

-p primary_index_file
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

Note:
Relative / exact path of file should be primary_index_mapping.

Example:
Primary Index File
landmarks => MODULE,LAND
AltName => TLID,RTSQ

-s database_name
Database name where the data will be imported to

-CSET charset_name
Specifies the client character set while logging onto the database.
If this parameter is not present, the default character set is assumed (ASCII for N/W clients).

Note:
Applicable values are UTF8.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 11
2: Teradata GeoImport Utility

Note:
Large data files may exceed Java heap memory. In the example, the -Xms option sets the initial Java
heap size to 256 MB. The -Xmx option sets the maximum Java heap size to 1024 MB.

Geospatial renames the column name as POINT for point type geometry and GEOM for all other types of
geometry if it does not receive a column name from the GDAL layer during import.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 12
3
Teradata GeoExport Utility

Teradata GeoExport Overview


Teradata GeoExport converts Teradata Geospatial data into a format that is compatible with the ESRI,
MapInfo, and TIGER/Line data formats.
The following figure shows data flow and component arrangement for Teradata GeoExport.

Teradata GeoExport Data Flow and Component Arrangement

TigerLine

ESRI
GDAL
Shapefile TdGeoSpatial
Libraries Teradata
Writes Export JDBC Database
Separate Layer <-Table Drivers
MapInfo Layers

KML

Teradata Geospatial Export unloads data from the database to Shape files like TIGER, MAPInfo, ESRI,
and KML.

Teradata GeoExport Process


The following steps and examples describe how to export with Teradata GeoExport.
1. Create a table of geospatial data in the database:

DROP TABLE customers;


CREATE TABLE customers(pkey integer, cust_name VARCHAR(10),
cust_zipcode VARCHAR(6) , loc ST_Geometry);
INSERT INTO customers(0, 'Anugu Raju', '500020', new
ST_Geometry('POINT(20.34 80.78)'));
INSERT INTO customers(1, 'Madhava', '500081', new
ST_Geometry('POINT(20.56 89.44)'));
INSERT INTO customers(2, 'Karthik', '500083', new
ST_Geometry('POINT(19.12 88.22)'));
INSERT INTO customers(3, 'Subbarao', '500012', new

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 13
3: Teradata GeoExport Utility

ST_Geometry('POINT(21.45 88.12)'));
SELECT * FROM customers ORDER BY 1;

2. Run TDGeoExport to create an ESRI Shapefile from the customers table.


64-bit path:

rm c:\temp\geodata\*
cd c:\temp\TdGeoImportExport\bin
java -Xms256m -Xmx1024m -classpath .;terajdbc4.jar;"C:\Program
Files\Teradata\Client\20.00\bin\tdgeospatial.jar";
com.teradata.geo.TDGeoExport -l hyvm20/geouser, geouser -s geouser -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.

TDGeoExport Command
Syntax

where:

-logmech logon_mechanism
Teradata Logon mechanism ,which determines the connection's authentication and
encryption capabilities (either TD2 (default) or LDAP).

-logdata log_data
Specifies additional data needed by a logon mechanism.

-l logon_string
Database logon string, where the format of logon_string is: Database/User,Password

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 14
3: Teradata GeoExport Utility

-s data_source_name
Database name that contains the table to convert

-t table_name
Table name (or view) to convert

-f format_name
Output file format name. The valid values for format_name are:
• MapInfo File
• TIGER version_code
• KML
• ESRI Shapefile shape_type [ ONLY ]
Exported ESRI Shapefiles can contain only one shape type, which must be specified.
"POINT","LINESTRING","POLYGON","MULTIPOINT","MULTILINESTRING","MULTIPOLYGON"
shape type can be specified for 2D geometry type and
"POINT25D","LINESTRING25D","POLYGON25D","MULTIPOINT25D","MULTILINESTRING25D",
"MULTIPOLYGON25D","POINTZ","POLYGONZ","MULTIPOINTZ" can be specified for 3D
geometry type. If multiple shape types occur in the table that is to be exported, specify the
optional ONLY keyword to restrict the export to only the specified type. Perform separate
export operations to export several different shape types.

-o output_directory_name
Directory where the output data files will be generated

-a_srs coordinate_system_name
Coordinate system. If not specified, the default is to use the coordinate system appropriate
to the output file format type. -a_srs can be specified as one of the four well-known systems
(WGS84, WGS72, NAD83, NAD27) or in the form of EPSG:n where n is EPSG GCS or
PCS code.

-n layer_name
Optional name of the layer to create.
If the -n option is omitted, then TDGeoExport uses the table name as the name of the layer
to create.

-CSET charset_name
Specifies the client character set while logging onto the database.
If not present default character set is assumed. (ASCII for N/W clients)

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 15
3: Teradata GeoExport Utility

Note:
Applicable values are UTF8.

Note:
Some large data files may exceed Java heap memory. In the example, the -Xms option sets the initial
Java heap size to 256MB. The -Xmx option sets the maximum Java heap size to 1024 MB.

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 files in the directory specified by the
-o output_directory_name
-a_srs can be specified as one of the four well-known systems (WGS84, WGS72, NAD83, NAD27) or in the
form of EPSG:n where n is the EPSG GCS or PCS code. Note that this does NOT perform a transformation.
It sets the spatial reference system of the exported data so that an external program can interpret the data
using the specified coordinate system.
When TIGER is specified as output format, we now require a version_code to be specified. This is because
specific versions adhere to specific structures and other requirements, and must therefore be specified for
correct export.
Please use the following as TIGER version_code for corresponding TIGER/Line Shapefiles as mentioned
in the following table while exporting in TIGER data format.

Version_Code TIGER/Line Shapefiles Remarks

0000 TIGER/LINE Precensus Files, 1990

0002 TIGER/LINE Initial Voting District Codes Files, 1990

0003 TIGER/LINE Files, 1990

0005 TIGER/LINE Files, 1992

0021 TIGER/LINE Files, 1994

0024 TIGER/LINE Files, 1995

0697 to 1098 TIGER/LINE Files, 1997

1298 to 0499 TIGER/LINE Files, 1998 Range is not numeric. It is


in mmyy.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 16
3: Teradata GeoExport Utility

Version_Code TIGER/Line Shapefiles Remarks

600, 700, 800 TIGER/LINE Files, 1999 Range is not numeric. It is


in mmyy.

1000, 1100 TIGER/LINE Files, Redistricting Census 2000

0301 to 0801 TIGER/LINE Files, Census 2000 Range is not numeric. It is


in mmyy.

0302 to 0502 TIGER/LINE Files, UA 2000 Range is not numeric. It is


in mmyy.

1002 to 0603 TIGER/LINE Files 2002 Range is not numeric. It is


in mmyy.

1203 to 0304 TIGER/LINE Files, 2003 Range is not numeric. It is


in mmyy.

0404 + TIGER/LINE Files, 2004 e.g. 0504 will set TIGER_ The format is mmyy.
2004 as export format

When ESRI Shapefile is specified as output format, we now require a shape_type to be specified. ESRI
Shapefile can only contain one shape type, so we require the user to decide what shape type will be for
any given export. If the shape type is incorrect (i.e., ANY value in the geometry column contains data of a
different type) an error will be reported, and export will fail. If the user knows that multiple shape types are
in one table which will be exported, the user can specify “only” following shape type and ONLY shapes of
the specified type will be exported. All others will be skipped over. In this way, data which contains multiple
shape types can be exported, with a different export/Shapefile for each shape type.
Geometrycollection cannot be specified as a shapetype when ESRI Shapefile is specified as output format.
If specified the export job will terminate with an error.
If the geometry column contains geometrycollection shape type data then this geometry data cannot be
exported with any of the supported shape type names.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 17
4
Teradata Geospatial Utilities Demonstration

Overview
The following topics describe how to use Teradata Geospatial Utilities from start to finish. Follow the process
in this order.
1. Grant Permissions
2. Create Table and Insert Syntax
3. Executing TDGeoExport
4. Executing TDGeoImport
5. Troubleshooting

Grant Permissions
Grant the user permissions on sysudtlib and sysspatial:

create user geouser as perm=1e9 password=geouser;


grant all on dbc to geouser with grant option;
grant all on sysudtlib to geouser with grant option;
grant all on sysspatial to geouser with grant option;

The following is a BTEQ example to create the user and grant permissions on sysudtlib and sysspatial:

C:\Program Files\Teradata\Client\20.00\bin>bteq .logon NODEID/dbc,dbc

Teradata BTEQ 20.00.00.00 (64-bit) for WIN64. PID: 11492


Copyright 1984-2023 Teradata. All rights reserved.
Enter your logon or BTEQ command:

.logon NODEID/dbc,

*** Logon successfully completed.


*** Teradata Database Release is 20.00.00.00
*** Teradata Database Version is 20.00.00.00
*** Transaction Semantics are BTET.
*** Session Character Set Name is 'ASCII'.

*** Total elapsed time was 2 seconds.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 18
4: Teradata Geospatial Utilities Demonstration

BTEQ -- Enter your SQL request or BTEQ command:


create user geouser as perm=1e9 password=geouser;

create user geouser as perm=1e9 password=geouser;

*** User has been created.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


grant all on dbc to geouser with grant option;

grant all on dbc to geouser with grant option;

*** Grant accepted.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


grant all on sysudtlib to geouser with grant option;

grant all on sysudtlib to geouser with grant option;

*** Grant accepted.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


grant all on sysspatial to geouser with grant option;

grant all on sysspatial to geouser with grant option;

*** Grant accepted.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


.logoff;

.logoff;
*** You are now logged off from the DBC.
Teradata BTEQ 20.00.00.01 (64-bit) for WIN64. Enter your logon or BTEQ command:
.quit;

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 19
4: Teradata Geospatial Utilities Demonstration

.quit;
*** Exiting BTEQ...
*** RC (return code) = 0

Create Table and Insert Syntax


Create table and insert syntax (POINT type data into ST_Geometry column):

CREATE TABLE customers(pkey integer, cust_name VARCHAR(10),cust_zipcode


VARCHAR(5) , loc ST_Geometry);
INSERT INTO customers(0, 'Fred Smith', '91234', new
ST_Geometry('POINT(20.34 80.78)'));
INSERT INTO customers(1, 'Richard Connor', '95421', new
ST_Geometry('POINT(20.56 89.44)'));
INSERT INTO customers(2, 'Anita Johnson', '98523', new
ST_Geometry('POINT(19.12 88.22)'));
INSERT INTO customers(3, 'Mary Willow', '90642', new
ST_Geometry('POINT(21.45 88.12)'));

The following is a BTEQ example to create the source table and populate the table with ST_Geometry
column data for TDGeoExport operation:

C:\Program Files\Teradata\Client\20.00\bin>bteq .logon NODEID/dbc,dbc

Teradata BTEQ 20.00.00.00 (64-bit) for WIN64. PID: 956


Copyright 1984-2023 Teradata. All rights reserved.
Enter your logon or BTEQ command:

.logon NODEID/dbc,

*** Logon successfully completed.


*** Teradata Database Release is 20.00.00.00
*** Teradata Database Version is 20.00.00.00
*** Transaction Semantics are BTET.
*** Session Character Set Name is 'ASCII'.

*** Total elapsed time was 3 seconds.

BTEQ -- Enter your SQL request or BTEQ command:


database geouser;

database geouser;

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 20
4: Teradata Geospatial Utilities Demonstration

*** New default database accepted.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


CREATE TABLE customers (pkey integer, cust_name VARCHAR(10), cust_zipcode V
ARCHAR(5) , loc ST_Geometry);

CREATE TABLE customers (pkey integer, cust_name VARCHAR(10), cust_zipcode V


ARCHAR(5) , loc ST_Geometry);

*** Table has been created.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


INSERT INTO customers(0, 'Fred Smith', '91234', new ST_Geometry('POINT (20.
34 80.78)'));

INSERT INTO customers(0, 'Fred Smith', '91234', new ST_Geometry('POINT (20.


34 80.78)'));

*** Insert completed. One row added.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


INSERT INTO customers(1, 'Richard Connor', '95421', new ST_Geometry('POINT
(20.56 89.44)'));

INSERT INTO customers(1, 'Richard Connor', '95421', new ST_Geometry('POINT


(20.56 89.44)'));

*** Insert completed. One row added.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


INSERT INTO customers (2, 'Anita Johnson', '98523', new
ST_Geometry( 'POINT(19.12 88.22)'));

INSERT INTO customers (2, 'Anita Johnson', '98523', new ST_Geometry( 'POINT
(19.12 88.22)'));

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 21
4: Teradata Geospatial Utilities Demonstration

*** Insert completed. One row added.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


INSERT INTO customers(3, 'Mary Willow', '90642', new ST_Geometry('POINT
(21.45 88.12)'));

INSERT INTO customers(3, 'Mary Willow', '90642', new ST_Geometry('POINT (21


.45 88.12)'));

*** Insert completed. One row added.


*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:


sel * from customers;

sel * from customers;

*** Query completed. 4 rows found. 4 columns returned.


*** Total elapsed time was 1 second.

pkey cust_name cust_zipcode loc


----------- ---------- ------------ ---------------------------------------
3 Mary Willo 90642 POINT (21.45 88.12)
0 Fred Smith 91234 POINT (20.34 80.78)
1 Richard Co 95421 POINT (20.56 89.44)
2 Anita John 98523 POINT (19.12 88.22)

BTEQ -- Enter your SQL request or BTEQ command:


.logoff;

.logoff;
*** You are now logged off from the DBC.
Teradata BTEQ 20.00.00.00 (64-bit) for WIN64. Enter your logon or BTEQ command:
.quit;

.quit;
*** Exiting BTEQ...
*** RC (return code) = 0

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 22
4: Teradata Geospatial Utilities Demonstration

Executing TDGeoExport
1. Execute TDGeoExport:

java -Xms256m -Xmx1024m com.teradata.geo.TDGeoExport -l NODEID/


geouser,geouser -t customers -f "ESRI Shapefile" point -o
C:\GeoSpatial\TestEnv\geodata -n customers

Sample Output of TDGeoExport Utility

C:\Program Files\Teradata\Client\20.00\bin>java -Xms256m -Xmx1024m


com.teradata.geo.TDGeoExport -l NODEID/geouser,geouser -t customers -f "ESRI
Shapefile" point -o C:\GeoSpatial\TestEnv\geodata -n customers
==============================================
= Teradata GeoExport VERSION 20.00.00.00 =
= =
= Copyright 2014-2023 Teradata. =
= ALL RIGHTS RESERVED. =
==============================================
Coordinate System defaulting to NAD83.
Logon = NODEID/geouser,****
LOGMECH = TD2
DatabaseName = geouser
Table Name = customers
Export to = C:\GEOSPATIAL\TESTENV\GEODATA\customers
File Format = ESRI Shapefile
Shape Type = POINT
Only 1 Type = FALSE
-------------------------------------------
connecting to NODEID ... connected!
-------------------------------------------
exporting table customers to layer customers ...
Warning 6: Normalized/laundered field name: 'cust_zipcode' to 'cust_zipco'
(4/4)
===========================================

Data exporting finished successfully!


Exporting time is 10.395

Note:
If the column name is more than 10 chars, tool will truncate and create 10 characters name.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 23
4: Teradata Geospatial Utilities Demonstration

If -CSET UTF8 is specified, data is exported as UTF8 characters for char/varchar data types. If
there are any database or JDBC connectivity issues, stack trace is printed to the console. Refer to
JDBC or Vantage documentation for troubleshooting. If there are any errors with GDAL libraries, see
http://www.gdal.org/.

Executing TDGeoImport
1. Execute TDGeoImport:

java -Xms256m -Xmx512m


com.teradata.geo.TDGeoImport
-l NODEID/geouser,geouser
-s geouser
-f C:\GeoSpatial\TestEnv\geodata -n customers

Sample Output of TDGeoImport Utility

C:\Program Files\Teradata\Client\20.00\bin>java -Xms256m -Xmx512m


com.teradata.geo.TDGeoImport -l NODEID/geouser,geouser -s geouser -f
C:\GeoSpatial\TestEnv\geodata -n customers
==============================================
= Teradata GeoImport VERSION 20.00.00.00 =
= =
= Copyright 2014-2023 Teradata. =
= ALL RIGHTS RESERVED. =
==============================================
DatabaseName = geouser
Data Source = C:\GeoSpatial\TestEnv\geodata
LayerName = customers
LOGMECH = TD2
Logon = NODEID/geouser,****
connecting to NODEID ... connected!
Validating layer: customers
All layers successfully validated.

-------------------------------------------
Importing layer customers to table CUSTOMERS... (4/4)
===========================================

Data importing finished successfully!


Importing time is 79.275

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 24
4: Teradata Geospatial Utilities Demonstration

Note:
If a user specifies -m, a MULTISET. SET table is created by default.

It is always better to have a unique column in data because UDT expects uniqueness of the row.
Because the database requires ordering functionality for UDTs, an ordering definition exists for the
ST_Geometry type. In general, however, ordering ST_Geometry types by their ordering definitions is
neither useful nor meaningful. Currently these tools support only one ST_Geometry column and for
good results, keep it the same as the last column.
If -CSET UTF8 is specified, data is exported as UTF8 characters for char / varchar data types. If
there are any database or JDBC connectivity issues, stack trace is printed to the console. Refer to
JDBC or Vantage documentation for troubleshooting. If there are any errors with GDAL libraries, see
http://www.gdal.org/.
If a user inserts a multipolygon shape type data into the geometry column of the table and exports
successfully via TDGeoExport, then during import the GDAL library reads the data, and if it finds
any invalid coordinates in the layer, it will insert geometry data as a Polygon shape type, instead of
multipolygon, into the target table.
Example to Verify the Target Table Data Using BTEQ

C:\Program Files\Teradata\Client\20.00\bin>bteq .logon NODEID/dbc,dbc

Teradata BTEQ 20.00.00.00 (64-bit) for WIN64. PID: 1964


Copyright 1984-2023 Teradata. All rights reserved.
Enter your logon or BTEQ command:

.logon NODEID/dbc,

*** Logon successfully completed.


*** Teradata Database Release is 20.00.00.00
*** Teradata Database Version is 20.00.00.00
*** Transaction Semantics are BTET.
*** Session Character Set Name is 'ASCII'.

*** Total elapsed time was 3 seconds.

BTEQ -- Enter your SQL request or BTEQ command:


database geouser;

database geouser;

*** New default database accepted.


*** Total elapsed time was 1 second.

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 25
4: Teradata Geospatial Utilities Demonstration

BTEQ -- Enter your SQL request or BTEQ command:


help user geouser;

help user geouser;

*** Help information returned. One row.


*** Total elapsed time was 1 second.

Table/View/Macro name Kind Comment


------------------------------ ---- ---------------------------------------
CUSTOMERS T ?

BTEQ -- Enter your SQL request or BTEQ command:


sel * from customers;

sel * from customers;

*** Query completed. 4 rows found. 4 columns returned.


*** Total elapsed time was 1 second.

PKEY CUST_NAME CUST_ZIPCO POINT


----------- ---------- ---------- -----------------------------------------
3 Mary Willo 90642 POINT (21.45 88.12)
0 Fred Smith 91234 POINT (20.34 80.78)
1 Richard Co 95421 POINT (20.56 89.44)
2 Anita John 98523 POINT (19.12 88.22)

BTEQ -- Enter your SQL request or BTEQ command:


.logoff;

.logoff;
*** You are now logged off from the DBC.
Teradata BTEQ 20.00.00.01 (64-bit) for WIN64. Enter your logon or
BTEQ command:
.quit;

.quit;
*** Exiting BTEQ...
*** RC (return code) = 0

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 26
4: Teradata Geospatial Utilities Demonstration

Troubleshooting

Troubleshoot JDBC with the Stack


Troubleshoot JDBC with the stack, which indicates RDBMS crash or down:

C:\Program Files\Teradata\Client\20.00\bin>java -Xms256m -Xmx1024m


com.teradata.geo.TDGeoExport -l ABC/geouser,geouser -t customers -f "ESRI
Shapefile" point -o C:\GeoSpatial\TestEnv\geodata -n customers
==============================================
= Teradata GeoExport VERSION 20.00.00.00 =
= =
= Copyright 2014-2023 Teradata. =
= ALL RIGHTS RESERVED. =
==============================================
Coordinate System defaulting to NAD83.
WARNING: There is data in the directory C:\GEOSPATIAL\TESTENV\GEODATA which was
specified.
If you continue, and there is pre-existing data for layer customers,
all data for that layer will be OVERWRITTEN.
Would you like to continue? [y,n] y
Logon = ABC/geouser,****
LOGMECH = TD2
DatabaseName = geouser
Table Name = customers
Export to = C:\GEOSPATIAL\TESTENV\GEODATA\customers
File Format = ESRI Shapefile
Shape Type = POINT
Only 1 Type = FALSE
-------------------------------------------
connecting to ABC ...2023-05-20.22:17:10.042 TERAJDBC4 ERROR [main]
com.teradata.jdbc.jdk6.JDK6_SQL_Connection@77459877 Connection to ABC Fri May 20
22:17:10 IST 2023 socket orig=ABC cid=6276ae34 sess=0
java.net.UnknownHostException: ABC at
java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at
java.net.InetAddress$2.lookupAllHostAddr(Unknown Source) at
java.net.InetAddress.getAddressesFromNameService(Unknown Source) at
java.net.InetAddress.getAllByName0(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.doLookup(TDNetworkIOIF.java:238
) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.getAddresses(TDNetworkIOIF.java

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 27
4: Teradata Geospatial Utilities Demonstration

:276) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:457)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.j
ava:184) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createIO(TDNetworkIOIF.java:175) at
com.teradata.jdbc.jdbc.GenericTeradataConnection.<init>(GenericTeradataConnectio
n.java:317) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:186)
at
com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:36)
at
com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6Connecti
onFactory.java:25) at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:181) at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:171) at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:226) at
com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:161) at
java.sql.DriverManager.getConnection(Unknown Source) at
java.sql.DriverManager.getConnection(Unknown Source) at
com.teradata.geo.TDGeoExport.makeConnection(TDGeoExport.java:811) at
com.teradata.geo.TDGeoExport.main(TDGeoExport.java:870)
java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 20.00.00.00] [Error 1000]
[SQLState 08S01] Login failure for Connection to ABC Fri May 20 22:17:10 IST 2023
socket orig=ABC cid=6276ae34 sess=0 java.net.UnknownHostException: ABC at
java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at
java.net.InetAddress$2.lookupAllHostAddr(Unknown Source) at
java.net.InetAddress.getAddressesFromNameService(Unknown Source) at
java.net.InetAddress.getAllByName0(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.doLookup(TDNetworkIOIF.java:238
) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.getAddresses(TDNetworkIOIF.java
:276) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:457)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.j
ava:184) at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createIO(TDNetworkIOIF.java:175) at
com.teradata.jdbc.jdbc.GenericTeradataConnection.<init>(GenericTeradataConnectio
n.java:317) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:186)
at
com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:36)

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 28
4: Teradata Geospatial Utilities Demonstration

at
com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6Connecti
onFactory.java:25) at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:181) at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:171) at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:226) at
com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:161) at
java.sql.DriverManager.getConnection(Unknown Source) at
java.sql.DriverManager.getConnection(Unknown Source) at
com.teradata.geo.TDGeoExport.makeConnection(TDGeoExport.java:811) at
com.teradata.geo.TDGeoExport.main(TDGeoExport.java:870)
at
com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.
java:95)
at
com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.
java:70)
at
com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java
:208)
at
com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:59
)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.j
ava:189)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createIO(TDNetworkIOIF.java:175)
at
com.teradata.jdbc.jdbc.GenericTeradataConnection.<init>(GenericTeradataConnectio
n.java:317)
at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:186)
at
com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:36)
at
com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6Connecti
onFactory.java:25)
at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:181)
at
com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java
:171)

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 29
4: Teradata Geospatial Utilities Demonstration

at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:226)
at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:161)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.teradata.geo.TDGeoExport.makeConnection(TDGeoExport.java:811)
at com.teradata.geo.TDGeoExport.main(TDGeoExport.java:870)
Caused by: java.net.UnknownHostException: ABC
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.doLookup(TDNetworkIOIF.java:238
)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.getAddresses(TDNetworkIOIF.java
:276)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:457)
at
com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.j
ava:184)
... 13 more
Connecting to database failed.
===========================================
Data exporting failed!

Troubleshoot Issues with SET and MULTISET Tables


C:\Program Files\Teradata\Client\20.00\bin>java com.teradata.geo.TDGeoImport -l
NODEID/dbc,dbc -f C:\temp\geodata
==============================================
= Teradata GeoImport VERSION 20.00.00.00 =
= =
= Copyright 2014-2023 Teradata. =
= ALL RIGHTS RESERVED. =
==============================================
DatabaseName = geouser
Data Source = C:\GeoSpatial\TestEnv\geodata
LayerName = customers
LOGMECH = TD2

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 30
4: Teradata Geospatial Utilities Demonstration

Logon = NODEID/dbc,****
Data Source = C:\temp\geodata
connecting to NODEID ... connected!
Validating layer: SOIL_IA_REJECTED_SEQ
All layers successfully validated.
-------------------------------------------
Importing layer SOIL_IA_REJECTED_SEQ to table SOIL_IA_REJECTED_SEQ... (427/427)
===========================================
Data importing finished successfully!
Importing time is 61.266

Bteq out shows as follows:


BTEQ -- Enter your SQL request or BTEQ command:
show table ab2.SOIL_IA_REJECTED_SEQ;
show table ab2.SOIL_IA_REJECTED_SEQ;
*** Text of DDL statement returned.
*** Total elapsed time was 1 second.
---------------------------------------------------------------------------
CREATE SET TABLE ab2.SOIL_IA_REJECTED_SEQ ,NO FALLBACK , NO BEFORE JOURNAL, NO
AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO (
AREASYMBOL VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
SPATIALVER FLOAT,
MUSYM VARCHAR(6) CHARACTER SET LATIN NOT CASESPECIFIC,
MUKEY VARCHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
GEOM SYSUDTLIB.ST_Geometry)
PRIMARY INDEX ( AREASYMBOL );
BTEQ -- Enter your SQL request or BTEQ command:
sel count(*) from ab2.SOIL_IA_REJECTED_SEQ;
sel count(*) from ab2.SOIL_IA_REJECTED_SEQ;
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
Count(*)
-----------
91

Case 2: Database used is ab and -m option data files are


from C:\temp\geodata.
C:\Program Files\Teradata\Client\20.00\bin>java -l NODEID/dbc,dbc -f
C:\temp\geodata -m
==============================================
= Teradata GeoImport VERSION 20.00.00.00 =
= =
= Copyright 2014-2023 Teradata. =
= ALL RIGHTS RESERVED. =

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 31
4: Teradata Geospatial Utilities Demonstration

==============================================
DatabaseName = geouser
Data Source = C:\GeoSpatial\TestEnv\geodata
LayerName = customers
LOGMECH = TD2
Logon = NODEID/dbc,****
connecting to NODEID ... connected!
Validating layer: SOIL_IA_REJECTED_SEQ
All layers successfully validated.
-------------------------------------------
Importing layer SOIL_IA_REJECTED_SEQ to table SOIL_IA_REJECTED_SEQ... (427/427)
===========================================
Data importing finished successfully!
Importing time is 105.641
Bteq out shows as follows:
BTEQ -- Enter your SQL request or BTEQ command:
show table ab.SOIL_IA_REJECTED_SEQ;
show table ab.SOIL_IA_REJECTED_SEQ;
*** Text of DDL statement returned.
*** Total elapsed time was 1 second.
---------------------------------------------------------------------------
CREATE MULTISET TABLE ab.SOIL_IA_REJECTED_SEQ ,NO FALLBACK , NO BEFORE JOURNAL,
NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO (
AREASYMBOL VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
SPATIALVER FLOAT,
MUSYM VARCHAR(6) CHARACTER SET LATIN NOT CASESPECIFIC,
MUKEY VARCHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
GEOM SYSUDTLIB.ST_Geometry)
PRIMARY INDEX ( AREASYMBOL );
BTEQ -- Enter your SQL request or BTEQ command:
sel count(*) from ab.SOIL_IA_REJECTED_SEQ;
sel count(*) from ab.SOIL_IA_REJECTED_SEQ;
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
Count(*)
-----------
427

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 32
A
Additional Information

Audience
This guide is intended for use by:
• Application programmers

Changes and Additions


For a complete list of changes to the product, see Teradata® Tools and Utilities Release Definition
(B035-2029) associated with this release.

Teradata Links
Link Description

https://docs.teradata.com/ Search Teradata Documentation, customize content to your needs, and


download PDFs.
Customers: Log in to access Orange Books.

https://support.teradata.com Helpful resources in one place:


• Support requests
• Account management and software downloads
• Knowledge base, community, and support policies
• Product documentation
• Learning resources, including Teradata University

https://www.teradata.com/University/Overview Teradata education network

https://support.teradata.com/community Link to Teradata community

Teradata® Tools and Utilities Teradata® Geospatial Utilities User Guide -


20.00, Release 20.00 33

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy