Teradata SQL Configuration

Teradata parameters are used to customize 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 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: enables the migration of DELETE to TRUNCATE. false: disables the migration of 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

This parameter is used to enable or disable Group By (grouping sets/cube/rollup) migration.

true: enables the migration of GROUP BY().

false: disables the migration of GROUP BY().

  • true

  • false

false

extendedGroupByClause=false

  • inToExists

This parameter can be used to enable and disable query optimization from IN/NOT IN to EXISTS/NOT EXISTS.

  • true

  • false

false

inToExists=false

  • rowstoreToColumnstore

Whether to convert row-store tables to column-store tables.

If this parameter is set to true, all row-store tables are converted to column-store tables during script migration.

  • true

  • false

false

rowstoreToColumnstore=false

  • session_mode

Default table type (SET/MULTISET) for CREATE TABLE.

Teradata: The default table type is SET.

ANSI: The default table type is MULTISET.

  • Teradata

  • ANSI

Teradata

session_mode=ANSI

  • tdMigrateALIAS

Whether to enable the migration of ALIAS.

true: enables the migration of ALIAS.

false: disables the migration of ALIAS.

  • true

  • false

false

tdMigrateALIAS=true

  • tdMigrateDOLLAR

Whether to enable the migration of static objects whose name starts with a dollar sign ($). This parameter is not applicable to dynamic objects, in format of ${}.

true: Enclose the name of a static object with double quotation marks (").

false: Disable the migration of static objects.

Note

For details, see Object name starting with $.

  • true

  • false

true

tdMigrateDOLLAR=true

  • tdMigrateLOCKoption

Whether to enable the migration of queries with the LOCK keyword.

true: enables the migration of such queries and comments out the LOCK keyword.

false: disables the migration of such queries. DSC Migration Tool skips this query and logs the following information:

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 enable the migration of ZEROIFNULL().

true: enables the migration of NULLIFZERO().

false: disables the migration of NULLIFZERO().

  • true

  • false

true

tdMigrateNullIFZero=true

  • tdMigrateVIEWCHECKOPTION

Whether to enable the migration of views containing CHECK OPTION.

true: comments out such views during migration.

If this parameter is set to false, such views are not migrated. The tool will copy the query as it is and record the following message:

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 enable the migration of ZEROIFNULL.

true: enables the migration of ZEROIFNULL().

false: disables the migration of ZEROIFNULL().

  • 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 Migrating Tables 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 enable the migration of CHARACTER SET and CASESPECIFIC.

true: comments out CHARACTER SET and CASESPECIFIC during script migration.

false: disables the migration of CHARACTER SET and DSC. In this case, DSC copies CHARACTER SET, CASESPECIFIC and logs the following information with query details (such as the file name and statement position):

Gauss does not have an equivalent syntax for CHARACTER SET & CASE SPECIFIC option in column-level.
You can rewrite this statement or set the configuration parameter tdMigrateCharsetCase to TRUE to comment the Character set & Case specific syntax in this statement.
  • true

  • false

false

tdMigrateCharsetCase=false

Note

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

  • terdataUtilities

Specifies whether the Teradata command line tool can be migrated.

The following options are supported:

  • true

  • false

  • true

  • false

true

terdataUtilities=true

  • unique_primary_index_in_column_table

Specifies whether unique indexes can be created for column-store tables.

  • true

  • false

true

unique_primary_index_in_column_table=true

  • default_charset

Specifies whether default_charset can be migrated.

The following options are supported:

  • LATIN

  • UNICODE

  • GRAPHIC

  • LATIN

  • UNICODE

  • GRAPHIC

LATIN

default_charset=LATIN

  • mergeImplementation

mergeImplementation has the following two types:

  • using WITH clause

  • splitting the queries

The following options are supported:

  • With

  • Split

  • None

  • With

  • Split

  • None

None

mergeImplementation=None

  • dsqlSupport

Specifies whether dsql is supported.

The following options are supported:

  • true

  • false

  • true

  • false

false

dsqlSupport=false

  • tdcolumnInSensitive

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

The following options are supported:

  • true

  • false

  • true

  • false

false

tdcolumnInSensitive=false

  • tdMigrateCASE_N

Specifies the migration mode of the CASE_N for partitioning. Gauss does not support multilevel (nested) partitioning:

The following options are supported:

  • comment

  • none

  • comment

  • none

comment

tdMigrateCASE_N=comment

  • tdMigrateRANGE_N

Specifies the migration mode of the RANGE_N for partitioning. Gauss does not support multilevel (nested) partitioning:

The following options are supported:

  • comment

  • none

  • range

  • comment

  • none

  • range

range

tdMigrateRANGE_N=range

  • tdMigrateAddMonth

Specifies whether addMonth can be migrated.

The following options are supported:

  • 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