tdr.SetContractDef Function | R Table Operators | Teradata Vantage - 17.10 - tdr.SetContractDef - 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)

Sets the contract context.

Syntax

tdr.SetContractDef(  ctx  )

Syntax Elements

ctx
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 );