FNC_GetDatasetResultLob Function | C Library Functions | Teradata Vantage - FNC_GetDatasetResultLob - 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

This routine allows DATASET data to be written to a LOB associated with a DATASET instance.

Syntax

void
FNC_GetDatasetResultLob( DATASET_HANDLE        datasetHandle,
                         LOB_RESULT_LOCATOR*   instance  )
DATASET_HANDLE datasetHandle
A handle to a DATASET data type instance that is defined to be an input parameter to an external routine.
LOB_RESULT_LOCATOR* instance
A pointer to a LOB_RESULT_LOCATOR to be used to write the LOB data of a DATASET instance.

Usage Notes

Use FNC_GetDatasetResultLob only when the DATASET data will be stored as a LOB. If FNC_GetDatasetInfo returns dataLob > 0, you can use FNC_GetDatasetResultLob; otherwise, you should use FNC_SetInternalValue instead.

The LOB_RESULT_LOCATOR obtained may be used with all LOB FNC routines that allow the user to write to this LOB.

For Avro instances, this routine returns a LOB_RESULT_LOCATOR which allows a user to write the UTF-8 encoded schema, null-terminated, followed by the binary-encoded Avro value to a buffer. This is equivalent to the transform format. Failure to write the data in this format results in an error.

For CSV values, the value is written to the result LOB, but does not include any optional schema.