JSONFORMAT

This section contains reference documentation for the JSONFORMAT function.

Extracts the object value from jsonField based on 'jsonPath', the result type is inferred based on JSON value. This function can only be used in an ingestion transformation function.

Signature

JSONFORMAT(object)

Usage Examples

The usage examples are based on extracting fields from the following JSON document:

{"timestamp": "2019-10-09 21:25:25", "meta": {"age": 12}}
ExpressionValue

JSONFORMAT(meta)

"{\"age\":12}"

This function can be used in the table config to extract the meta property into the data column, as described below:

{
   "tableConfig":{
      "ingestionConfig":{
         "transformConfigs":[
            {
               "columnName":"data",
               "transformFunction":"JSONFORMAT(meta)"
            }
         ]
      }
   }
}

Last updated