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

Writes an R data frame to the output stream.

Syntax

tdr.TblWrite(  handle,  df  )
handle
Parameter type: raw vector

The handle of the output stream returned by the tdr.Open function.

df
Parameter type: data frame

An R data frame containing the rows to be written.

Return Value

An integer indicating one of the following results.

Return Code Description
0 The operation was successful.
-1 The end of stream was reached.
-2 The table operator aborted.
-3 The input parameter has an invalid type.
-4 The input parameter has an invalid value.
-5 This function was called from the contract function.

Usage Notes

Before you call this function, you must call the tdr.Open function to open the output stream. Then pass the handle returned from tdr.Open as an argument to this function.

This function is valid only if called from the table operator.
The following data types are not supported in data frames:
  • DECIMAL8
  • DECIMAL16
  • TIME
  • TIME_WTZ
  • TIMESTAMP
  • TIMESTAMP_WTZ
  • INTERVAL_YTM
  • INTERVALH
  • INTERVALM
  • INTERVALS
  • INTERVAL_HTM
  • INTERVAL_HTS
  • INTERVAL_MTS
  • INTERVAL_SECOND
If you want to use these data types in data frames, you must cast them to a supported type.