tdr.SetContractDef Function | R Table Operators | Teradata Vantage - 17.10 - tdr.SetContractDef - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Sets the contract context.


tdr.SetContractDef(  ctx  )

Syntax Elements

Parameter type: raw

An opaque sequence of bytes that can be retrieved by the table operator.

Usage Notes

This function is valid only if called from the contract function.

An error is raised if the function is called from the table operator.

Example: Set the Contract Context

The following statements illustrate how this function can be used in the contract function:

  1. A data structure is created.
  2. The structure is serialized.
  3. The serialized version of the structure is set as the contract context.
    myctx <- list( division="appliances", codes=c(10, 34) );
    myctxS <- serialize( myctx, NULL );
    tdr.SetContractDef( myctxS );