Updated on 2025-12-11 GMT+08:00

Teradata SQL Migration

Teradata parameters are used to configure rules for Teradata script migration.

Open the features-teradata.properties file in the config folder and set the parameters in Table 1 as required.
Table 1 Table 1 Parameters in the features-teradata.properties file

Parameter

Description

Value Range

Default Value

Example

  • deleteToTruncate

Rule for migrating DELETE statements without a WHERE clause.

true: DELETE can be migrated to TRUNCATE. false: Do not change DELETE to TRUNCATE.

  • true
  • false

false

deleteToTruncate=true

  • distributeByHash

Which columns specified in the primary index will be used for data distribution across nodes in the cluster.

one: Data is distributed based on the first column specified in the primary index.

many: Data is distributed based on all the columns specified in the primary index.

This function is addressed by using the DISTRIBUTE BY clause.

NOTE:

This parameter is set to one in V100R002C60 because this version does not support multiple columns in the DISTRIBUTE BY clause.

  • one
  • many

many

distributeByHash

=many

  • extendedGroupByClause

Whether to migrate GROUP BY (grouping sets/cube/rollup).

true: GROUP BY() can be migrated.

false: GROUP BY() cannot be migrated.

  • true
  • false

false

extendedGroupByClause=false

  • inToExists

Whether to enable query optimization from IN/NOT IN to EXISTS/NOT EXISTS.

  • true
  • false

false

inToExists=false

  • rowstoreToColumnstore

Whether to convert a row-store table to a column-store table.

true: All row-store tables will be converted to column-store tables during the script migration.

  • true
  • false

false

rowstoreToColumnstore=false

  • session_mode

Default table type (SET/MULTISET) when CREATE TABLE is executed.

Teradata: The default table type is SET.

ANSI: The default table type is MULTISET.

  • Teradata
  • ANSI

Teradata

session_mode=ANSI

  • tdMigrateALIAS

Whether to enable ALIAS migration.

true: The ALIAS migration is enabled.

false: The ALIAS migration is disabled.

  • true
  • false

false

tdMigrateALIAS=true

  • tdMigrateDOLLAR

Whether to migrate static objects whose names start with $(dollar symbol). This parameter is not applicable to dynamic objects, in format of ${}.

true: The object names starting with $are enclosed in double quotation marks ("").

false: The objects whose names start with $are directly migrated.

  • true
  • false

true

tdMigrateDOLLAR=true

  • tdMigrateLOCKoption

Whether to migrate queries with the LOCK keyword.

true: Such queries are migrated and their LOCK functions are commented out (from LOCK to ACCESS).

false: Such queries are not migrated. DSC skips such queries and logs the following information:

1
Gauss does not have equivalent syntax for LOCK option in CREATE VIEW and INSERT statement. Please enable the config_param tdMigrateLockOption to comment the LOCK syntax in the statement.
NOTE:

For details, see ACCESS LOCK.

  • true
  • false

false

tdMigrateLOCKoption=true

  • tdMigrateNULLIFZERO

Whether to migrate NULLIFZERO().

true: NULLIFZERO() is migrated.

false: NULLIFZERO() is not migrated.

  • true
  • false

true

tdMigrateNullIFZero=true

  • tdMigrateVIEWCHECKOPTION

Whether to migrate views containing CHECK OPTION.

true: Such views are commented out during migration.

false: Such views are not migrated. The tool copies the queries as they are and logs the following information:

1
Gauss does not support WITH CHECK OPTION in CREATE VIEW. Please enable the config_param tdMigrateViewCheckOption to comment the WITH CHECK OPTION syntax in the statement.

  • true
  • false

false

tdMigrateVIEWCHECKOPTION=true

  • tdMigrateZEROIFNULL

Whether to migrate ZEROIFNULL.

true: ZEROIFNULL() is migrated.

false: ZEROIFNULL() is not migrated.

  • true
  • false

true

tdMigrateZEROIFNULL=true

  • volatile

Type of tables whose data is specific to a session and is stored only for the session. When the session ends, the data and tables are deleted.

A volatile table can be a table migration table or an unlogged table.

NOTE:

unlogged is supported in V100R002C60 and local temporary is not.

  • local temporary
  • unlogged

local temporary

volatile=unlogged

  • tdMigrateCharsetCase

Whether to migrate CHARACTER SET and CASESPECIFIC.

true: CHARACTER SET and CASESPECIFIC are commented out during script migration.

false: CHARACTER SET and CASESPECIFIC are not migrated. In this case, DSC copies queries as they are and records the following information in the error log file, including query details (such as the file name and statement location):


       
1
CHARACTER SET and CASESPECIFIC are column-level options. GaussDB does not provide equivalent syntax. You can modify the corresponding statement or set tdMigrateCharsetCase to true to comment out CHARACTER SET and CASESPECIFIC.

  • true
  • false

false

tdMigrateCharsetCase=false

NOTE:

If tdminatecharsetcase is set to true, the special keyword of the character is commented out.

  • terdataUtilities

Whether the Teradata command line tool can be migrated.

The value can be:

  • true
  • false
  • true
  • false

true

terdataUtilities=true

  • unique_primary_index_in_column_table

Whether unique indexes can be created for column-store tables.

  • true
  • false

true

unique_primary_index_in_column_table=true

  • default_charset

Whether default_charset can be migrated.

The value can be:

  • LATIN
  • UNICODE
  • GRAPHIC
  • LATIN
  • UNICODE
  • GRAPHIC

LATIN

default_charset=LATIN

  • mergeImplementation

Merge type. You can:

  • Use WITH clauses.
  • Split the queries.

The value can be:

  • With
  • Split
  • None
  • With
  • Split
  • None

None

mergeImplementation=None

  • dsqlSupport

Whether dsql is supported.

The value can be:

  • true
  • false
  • true
  • false

false

dsqlSupport=false

  • tdcolumnInSensitive

Whether to remove column names that contain double quotes during migration.

The value can be:

  • true
  • false
  • true
  • false

false

tdcolumnInSensitive=false

  • tdMigrateCASE_N

Migration mode of the CASE_N for partitioning. Gauss does not support multilevel (nested) partitioning.

The value can be:

  • comment
  • none
  • comment
  • none

comment

tdMigrateCASE_N=comment

  • tdMigrateRANGE_N

Migration mode of the RANGE_N for partitioning. Gauss does not support multilevel (nested) partitioning.

The value can be:

  • comment
  • none
  • range
  • comment
  • none
  • range

range

tdMigrateRANGE_N=range

  • tdMigrateAddMonth

Whether addMonth can be migrated.

The value can be:

  • true
  • false

If this parameter is set to true, ADD_MONTHS changes into mig_td_ext.ADD_MONTHS (added mig_td_ext) after the migration. Otherwise, migration is not supported.

  • true
  • false

false

tdMigrateAddMonth=false