Updated on 2023-04-03 GMT+08:00

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

Whether to enable the migration of 3 (grouping sets/cube/rollup).

true: enables the migration of GROUP BY().

false: disables the migration of GROUP BY().

  • true
  • false

false

extendedGroupByClause=false

  • inToExists

Whether to enable the migration of IN and NOT IN Conversion to EXISTS/NOT EXISTS for query optimization.

  • 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 creating a 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 start 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 Names 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 NULLIFZERO().

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: Comment out such views during migration.

false: Disable the migration of such views. The migration tool copies the query and logs the following information:

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.

The value can be local temporary or unlogged.

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: Comment out CHARACTER SET and CASESPECIFIC during script migration.

false: Disable 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

Migration support for teradata utilities.

Possible values - TRUE/FALSE

  • true
  • false
  • true
  • false

true

terdataUtilities=true

  • unique_primary_index_in_column_table

Creating a unique index for a column store table is not supported.

  • true
  • false

true

unique_primary_index_in_column_table=true

  • default_charset

Migration support for default_charset. Possible values: LATIN/UNICODE/GRAPHIC

  • LATIN
  • UNICODE
  • GRAPHIC

LATIN

default_charset=LATIN

  • mergeImplementation

mergeImplementation has the following two types:

  • using WITH clause
  • splitting the queries

Possible values:

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

None

mergeImplementation=None

  • dsqlSupport

This parameter supports dsql.

Possible values:

  • true
  • false
  • true
  • false

false

dsqlSupport=false

  • tdcolumnInSensitive

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

Possible values:

  • 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

Migration support for addMonth.

Possible values: TRUE and FALSE

  • true
  • false

false

tdMigrateAddMonth=false