CDC_SET_METADATA - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
Last updated
2024-11-25
Published on
2024-11-25T15:00:28.224244

The CDC_SET_METADATA function specifies the value or content of the OPTIONS metadata user_data header tag associated with JSON or AVRO target datastores ONLY. The value once assigned, will remain and be used for every AVRO or JSON record written unless or until it is changed.

Category

Change Data Capture

Syntax
CDC_SET_METADATA(user_data, data_string)
Parameters and Descriptions
Parameter Description
user_data The default name of the METADATA header tag.
data_string The data string in character format. The data string can be a field from a source datastore, a variable, a constant or the result of another Function.

Example 1

Set the value of the user_data Header tag:
CDC_SET_METADATA(user_data,’My Content’)   --sets to ‘My Content’
CDC_SET_METADATA(user_data, CALL(F_HIVE_TIMESTAMP,CDCTSTMP(CDCIN)))  --sets to a hive formatted timestamp
CDC_SET_METADATA(user_data,RIGHT(CDC_METADATA(OBJECT_NAME),4))  --sets to the right 4 chars of the object_name.