Usage Notes - 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ā„¢

You can use this function to close an input or output stream within a table operator invocation. The function closes the stream. When closing an output stream in protected mode, this function flushes the buffer to the database. After calling this function, Read and Write calls are no longer valid; however, you can call FNC_TblOpClose prior to reading all of the rows.

You can close and reopen an input stream within a request that did not specify a PARTITION BY clause. You can close an output stream a single time within a table operator invocation.

If you specify the PARTITION BY clause, then opening or closing a stream refers to the rows within the partition. For example, End of File occurs after the last row in the partition is read. If you do not specify the PARTITION BY clause, opening or closing a stream refers to the rows within the AMP.

The following are not allowed and result in an error:

  • Close an input or output stream that is not open.
  • Close and reopen an output stream.