Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.11 KB

tojsonmapstr.md

File metadata and controls

41 lines (31 loc) · 1.11 KB
description
This section contains reference documentation for the TOJSONMAPSTR function.

TOJSONMAPSTR

Convert map to JSON String. This function can only be used in an ingestion transformation function.

Signature

TOJSONMAPSTR(map)

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}}
Expression Value
TOJSONMAPSTR(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":"TOJSONMAPSTR(meta)"
            }
         ]
      }
   }
}