convertpacked
Convert keys and values within a dictionary into a new format.
Introduction
Use the convertpacked enrichment instruction to convert the keys and values in a dictionary. Use {__value}
to access the values in a dictionary and {__key}
to access the keys. To unpack a dictionary into separate columns, use the unpackdict enrichment.
Creating the enrichment
For more information on creating an enrichment, see Using custom scripts.
Configuring the enrichment
To configure the enrichment, fill in the following fields. Required fields are marked with an asterisk (*).
-
Fieldname
-
Enter the name of the column containing the dictionaries to convert.
-
Python Expression
-
Enter the Python expression to convert the values or keys in a dictionary.
For example, enter
float({__value})
to convert the numerical values into a float. -
Format
-
Select the format of the dictionary to convert. Select either json or yaml.