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

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Sets the contract context.

Syntax

tdr.SetContractDef(  ctx  )
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 );