Support for Multiple Transform Groups - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantage™ JSON Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

The JSON type in Field, Record, and Indicator modes uses transforms. The JSON type has the following predefined transform groups to convert objects to CLOB, BLOB, VARCHAR, and VARBYTE.

Transform Group Complex Data Type Primary Type Default Format
TD_JSON_CLOB JSON

CLOB(16776192) CHARACTER SET LATIN

or

CLOB(8388096) CHARACTER SET UNICODE

Yes Text format in the same character set as the JSON type instance
TD_JSON_BLOB JSON BLOB(16776192) No BSON format
TD_JSON_VARCHAR JSON

VARCHAR(64000) CHARACTER SET LATIN

or

VARCHAR(32000) CHARACTER SET UNICODE

No Text format in the same character set as the JSON type instance
TD_JSON_VARBYTE JSON VARBYTE(64000) No BSON format

You can use the TRANSFORM option in the CREATE PROFILE/MODIFY PROFILE or CREATE USER/MODIFY USER statements to specify for a user the particular transform group that will be used for a given data type.

Use the SET TRANSFORM GROUP FOR TYPE statement to change the active transform group in the current session. You can use this statement multiple times for a data type to switch from one transform group to another within the session. If the logon user already has transform settings, the statement modifies the transform settings for the current session.

You cannot use CREATE TRANSFORM or REPLACE TRANSFORM to create new transforms for complex data types (CDTs). You can only create new transforms for structured and distinct user-defined types (UDTs).

Transform Group Macros

You can use the following macros to find the transform group for a UDT (or CDT), or the transform group settings for a user, profile, or current session.

Macro Description
SYSUDTLIB.HelpCurrentUserTransforms Lists the transform group settings of the current logon user.
SYSUDTLIB.HelpCurrentSessionTransforms Lists the transform group settings of the current session.
SYSUDTLIB.HelpUserTransforms(User) Lists the transform group settings for a specific user.
SYSUDTLIB.HelpCurrentUDTTransform(UDT)

Lists the transform group settings of the current session for the specified UDT.

SYSUDTLIB.HelpUDTTransform(User,UDT) Lists the transform group for a UDT for a user.
SYSUDTLIB.HelpProfileTransforms(Profile) Lists the transform group settings for a specific profile.

SYSUDTLIB.HelpProfileTransform(Profile,UDT)

Lists the transform group for a UDT for a profile.

For more information about these macros, see Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.

Related Topics

  • "CREATE PROFILE" and "MODIFY PROFILE" in Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144
  • "CREATE USER" and "MODIFY USER" in Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144
  • "SET TRANSFORM GROUP FOR TYPE" in Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144