17.10 - Rules for Writing UDFs that Compress/Decompress LOB Data - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)
  • The compress UDF should have the following signature:
    • The scalar UDF must declare a single input parameter which has a data type of BLOB, CLOB, or supported distinct LOB-type UDT.
    • The parameter data type and column data type should be the same.
    • The return type should be BLOB.
  • The decompress UDF should have the following signature:
    • The scalar UDF must declare a single BLOB input parameter. The length of the input parameter should be equal to or greater than the length of the BLOB data type returned by the compression UDF.
    • The output of the decompress UDF should be identical to the column type.