JSONify
Description
Transforms a JSON or ARRAY contained in a text field into an actual JSON or ARRAY to be written into files. Returns null if the value does not fit these types.
Category
Transformation
Restrictions
- Can only be used with the Amazon S3 destination.
Supported Field Types
- text
Output Field Type
- text
Arguments
None
Pseudo-code (Python)
def func(val):
"""
val: field value
"""
if type(val) is dict or type(val) is list:
return val
else:
return None
Use the JSONify Transformation
Apply the JSONify function in Kondado to convert JSON or array strings into structured data for Amazon S3 destinations.
Access the transformation pipeline
Navigate to your pipeline configuration in Kondado where you want to apply data transformation before sending data to your destination.
Select the text field to transform
Identify the source field containing JSON or array data stored as text that needs to be converted to actual structured format.
Apply the JSONify function
Add the JSONify transformation to your pipeline. This function parses text fields and returns proper JSON objects or arrays, or null if the value is invalid.
Configure Amazon S3 as destination
Ensure your pipeline outputs to Amazon S3, as JSONify is restricted to this destination only.
Validate the output
Run your pipeline and verify that the transformed fields are written as structured JSON or arrays rather than plain text strings.