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

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

Sets the HASH BY specification for a specified input stream.

Syntax

tdr.SetHashByDef(  streamno,  hashbydef  )

Syntax Elements

streamno
Parameter type: integer

The input stream number.

hashbydef
Parameter type: list

A vector of column names.

Usage Notes

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

The function must run on a PE-only node.

An error is raised in the following situations:
  • The function is called from the table operator.
  • The HASH BY metadata was already set.

Example: Set the HASH BY Specification for an Input Stream

The following statement sets the HASH BY metadata for input stream 0 with the specification that the columns in the HASH BY clause are col1 and col3.

hashbydef <- c("col1", "col3");
tdr.SetHashByDef( 0, hashbydef );