15.10 - TDGeoImport - Teradata Database

Teradata Database SQL Geospatial Types

Teradata Database
Programming Reference

Converts layers from ESRI, MapInfo, and TIGER/Line data sources and loads the data into the database.


Syntax element …

Specifies …

-l logon_string

the Teradata Database logon string, where the format of logon_string is:


-f data_source_name

the file or directory with the data files.

TDGeoImport supports the following OGR supported input file formats:

  • ESRI Shapefiles
  • MapInfo data sets in native TAB format
  • U.S. Census Bureau TIGER/Line files
  • -a_srs coordinate_system

    the coordinate system for imported geospatial data.

    -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.

    -BSIZE rows_in_batch

    number of bytes of data in a batch insert. If the -BSIZE option is not present, a batch insert consists of 30,000,000 bytes.

    -c char_mapping

    a text file that maps illegal characters in the imported data to legal characters for Teradata Database. For the format of the file, see “Character Map File” on page 207.

    -FLOAD load_type

    whether FastLoad is on or off, and whether logging is used. The valid values for load_type are 0, 1, and 2:

  • 0  means FastLoad off
  • 1  means FastLoad on, logging off
  • 2  means FastLoad on, logging on
  • If the -FLOAD option is not present, FastLoad is set to on.

    -k keyword_map_file

    an optional file that maps table and column names in the input data files to other names. For the file format, see “Keyword Map File” on page 207.

    This is useful if the input data uses Teradata reserved words or other illegal names, for example names containing embedded spaces or illegal symbols.

    By default, TDGeoImport uses the geospatial layer name as the target table name, and the field name as the target column name.


    that tables used to store the imported data should be multiset tables. If
    -m is not used, tables will be set tables.

    -n layer_name

    The layer name. Typically, a layer will be converted into a specific database table. The table will contain a column for the spatial object, and a column for each attribute in the layer.

    If the -n option is omitted, TDGeoImport processes all of the layers in the data source.

    -p primary_index_file

    an optional file that specifies the primary index for each table. For the file format, see “Primary Index File” on page 207.

    If this option is omitted, the first column in the table is designated as the primary index.

    -s database_name

    the name of the database in which to create the tables.

    If the -s option is omitted, TDGeoImport creates the tables in the default database of the logon user.

    During the conversion process, for columns of type ST_Geometry, TDGeoImport uses the functionality of the OGR open source library to convert from the external format to the WKB format in the form of a BLOB. TDGeoImport inserts the BLOB data into the table using the BLOB form of the ST_Geometry constructor, converting the WKB representation to an ST_Geometry UDT.

    The resulting WKB that the source data generates is limited to a maximum size of 16 MB.

    TDGeoImport does not support loading secondary indexes. Secondary indexes can be added after tables are loaded by TDGeoImport.

    The character map file consists of pairs of characters, separated by '=>'. The input character on the left is mapped to the legal Teradata Database character on the right.

    Example character map file:

       $ => S
       " " => ""

    The first line indicates that any $ character in the input file should be replaced by the S character in the Teradata Database table that is created for the input data.

    The keyword map file consists of pairs of words, separated by '=>'. The input keyword on the left is mapped to the Teradata Database keyword on the right.

    Example keyword map file:

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

    The first line indicates that if there is a FILE column in the input data, it should be mapped to a _FILE column in the table created in Teradata Database.

    The primary index file consists of table names and corresponding primary index columns, separated by '=>'.

    Example Primary Index file:

       landmarks => MODULE,LAND
       AltName   => TLID,RTSQ

    The first line indicates that for the landmarks table created in Teradata Database, the Primary Index should consist of the MODULE and LAND columns.

    Assume an input file exists named co99_d00.shp in the directory c:\data\demo\load.

    java -classpath .;terajdbc4.jar;tdgssjava.jar;tdgssconfig.jar; com.teradata.geo.TDGeoImport -l geo_system/geo_user,geo_pw -s mydb -f c:\data\demo\load -n co99_d00