Using tosql Transform Routines | CREATE TRANSFORM | Teradata Vantage - Rules For tosql Transform Routines - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

A tosql routine transforms a predefined data type to a UDT.

The tosql transform routines are generally used by utilities such as FastLoad to convert incoming client data directly into its corresponding UDT data type in the database.

The rules for tosql routines are as follows:
  • The tosql transform routine can only be a UDF.

    methods are not valid.

  • The tosql UDF transform routine must be defined as DETERMINISTIC.
  • The tosql UDF transform routine must have one and only one declared parameter, which must be a predefined data type.

    The RESULT data type must be the UDT.

  • The tosql UDF transform routine must be contained within the SYSUDTLIB database.
  • If you declare both a tosql transform routine and a fromsql routine, then the declared parameter data type of the tosql routine must be identical to the RESULT data type of the fromsql routine.