tdr.SetContractDef Function | R Table Operators | Teradata Vantage - tdr.SetContractDef - Analytics Database - Teradata Vantage

SQL External Routine Programming

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
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

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