Defining Teradata Functions

The following properties are applicable to a Teradata Function object.

Tab

Property

Description

Additional Information

  Name Specifies the physical name of the function  
  Database Specifies the database or user to which the object belongs  
  Type Specifies whether the function is applied at model level or table level Model Level: Indicates that the function is applied for database models.

Table Level: Indicates that the function is applied for database tables.

  Function Type Specifies the function type

Scalar: Indicates that the object is a scalar function.

Table: Indicates that the object is a table function.

  Enabled Specifies whether the function is enabled

True: Indicates that the function is enabled.

False: Indicates that the function is disabled.

  Use Replace Syntax Specifies whether the REPLACE syntax is used  
  Attach to New Specifies whether the function must be attached to a new table upon its creation  
  Generate Specifies whether a DDL statement is generated for the table during Forward Engineering  
  Generate as Pre-Script Specifies whether to generate the DDL as pre-script

Pre-Creation: Indicates that in the DDL, the function code is inserted before the object creation statements.

Post-Creation: Indicates that in the DDL, the function code is inserted after the object creation statements.

Parameters Parameters Specifies the parameters associated with the selected function  
Physical Data Type Specifies the user-defined data type or the data type in use  
Character Set Specifies the type of character set that is used Valid values are: Latin, Unicode, Kanji-Shift JIS, Graphic.
Is Variant Type Specifies whether the parameter is of variant type  
General Specific Name Specifies the specific function type  
Return Data Type Specifies the data type for the value returned by the function Available if Function Type is Scalar.
Character Set Type Specifies the character set type
Return Cast Data Type Specifies the data type to which the result returned from the function is cast
Return Cast User Defined Type Specifies the user-defined data type to which the result returned from the function is cast
Return Cast Character Set Type Specifies the character set type to which the result returned from the function is cast
Return Table Definition Specifies a reference to define the table returned by the function Available if Function Type is Table.
Return Table Varying Columns Specifies a reference to define the varying columns returned by the function
Options Class Specifies whether the function is scalar or aggregate  
Aggregate Cache Size Specifies the size of the cache for the aggregate function  
Deterministic Specifies whether the function returns identical results for identical inputs  
Language Specifies the language in which the function is written  
Null Input Specifies whether a function is called if a parameter is null

Called: Indicates that the function is evaluated even if the input is null

Returns Null: Indicates that a null is returned if the input is null

Parameter Style Specifies the style of the parameters Available options are: SQL, Teradata General, Java, Teradata Internal, and SQLTABLE
SQL Data Access Specifies whether the SQL statements are permitted in the function No SQL: Indicates that SQL statements are not permitted in the function
Compression Type Specifies whether the function is to be used for compression or decompression of data

For Compress: Indicates that the function is used for algorithmic compression of data

For Decompress: Indicates that the function is used used for decompression of data that was algorithmically compressed

Map Specifies a contiguous or sparse map for the function  
Colocate Specifies the colocation name for the function  
Global_Persistent_Data_Set Specifies the GLOP data set  
Debug Specifies whether debug symbols are to be produced  
Compile Specifies the mode in which the function should be compiled

Compile and Build: Indicates that the code source of the function is compiled and the library files (.so or .dll) are created and distributed to all nodes of the system

Compile Only: Indicates that the system only compiles the code source of the function

Execute Specifies the mode in which the function should be executed

Protected: Indicates that the function is executed in protected mode

Not Protected: Indicates that the function is executed in unprotected mode

Source Files   Specifies the source files for the function  
External Delimiter Specifies the delimiting character for the External Name clause  
External Security Authorization Specifies the authorizations for users and user permissions  
External Security Type Specifies the type of authorization

Definer: Indicates that the OS user authorization that is associated with the creator of the authorization object is used

Invoker: Indicates that the OS user authorization that is associated with the database user who invokes it is used

External Name Specifies an identifier for the entry point name or a string to identify the path to it  
Entry Point Name Specifies the name of the entry point of the function  
Code   Specifies the template code of the function that can include SQL statements and macros  
Expanded Code Expanded Code (Read Only) Specifies the expanded code of function  
Context Specifies the table or view for which the expanded code must be generated Available only when Type is Table Level.