metaaddfield

Add a column to the data extract containing selected data from the metaheader.

Introduction

Use the metaaddfield enrichment to add a metadata from a data extract into the rows of your data extract table.

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*

Specify the name of the new field to add to the data extract.

Metaname

Enter the name of the source field in the header that contains the metadata to add to the data extract. If the metadata is nested in a dictionary, you can navigate to the values using . separated field names. An example of navigating nested values is shown in Example 2.

Index

Specify where to add the new field in the data extract. To add the field to the first position, specify 0. To add the field to the last position, specify -1.

Example 1

This example is searching for the simple, non-nested metadata of client_name.

Enrichment configuration

Fieldname*

Metadata

Metaname

client_name

Index

2

Data table before enrichment

Campaign

Ad Group

Clicks

Brand

media

7

Brand

ecommerce

3

Dashboard

media|social

18

Data table after enrichment

Campaign

Ad Group

Metadata

Clicks

Brand

media

Tenant#1

7

Brand

ecommerce

Tenant#2

3

Dashboard

media|social

Tenant#3

18

Example 2

This example is searching for the nested metadata {"custom_meta_information":{"source_directory":"uploads"}}.

Enrichment configuration

Fieldname*

Metadata

Metaname

custom_meta_information.source_directory

Index

2

Data table before enrichment

Campaign

Ad Group

Clicks

Brand

media

7

Brand

ecommerce

3

Dashboard

media|social

18

Data table after enrichment

Campaign

Ad Group

Metadata

Clicks

Brand

media

uploads

7

Brand

ecommerce

uploads

3

Dashboard

media|social

uploads

18