Search API Connector Documentation
Flatten Fields to Columns
Example Data Structure
You may encounter an inconvenient pattern where key-value pairs are listed within a parent header, like this:
In this example, we have multiple keys like "Store name" and "Order number" grouped together under attributes.name, which can make the data hard to work with. Our desired output is to pull out each attribute key and give it its own column, like this:
How to Flatten Data
API Connector provides an option to automatically extract these keys and convert them into headers.
Facebook Ads actions
The Facebook Ads
/insights endpoint returns "actions" (aka conversions or results) in an unflattened list. Selecting Facebook Ads actions will automatically flatten these actions into separate columns. This option is automatically selected for any requests that connect to Facebook Ads via OAuth.
Facebook Pages data
The Facebook Pages
/insights endpoint returns page metrics in an unflattened list. Selecting Facebook Pages data will automatically flatten these page metrics into separate columns. This option is automatically selected for any requests that connect to Facebook Pages via OAuth.
The custom option enables flattening any data set through the use of two configuration settings: Path to header and Path to value. In Path to header, enter the field that should be converted into headers. In Path to value, enter the location of the associated value.
- The path values should be the generic path without numeric arrays, e.g. enter
- The number of levels need to match, e.g. you can't use