How to update datasource dimensions and metrics
Overview
A dimension column, labeled in blue, will be a column you would like to keep in the database even when a new file is received. Metrics will be updated as dimensions come in. This only applies to datasources that are set to “Add and update” in the Advanced Settings tab of a datasource. If the datasource is set to “Replace”, then only the newest file’s data will populate the datasource. To check if your datasource is set to Add and update:
To expand a little more with a few examples, a dimension is static and doesn’t change (ids, names, platform, device) and a metric is a thing that is updated with fresh data (like impressions, clicks, revenue).
For example:
Current Data
campaign | adgroup | impressions |
PMG~TestCampaign~Evergreen | PMG~TestAdgroup~Evergreen | 230 |
PMG~TestCampaign~Prospecting | PMG~TestAdgroup~Prospecting | 353 |
New File
campaign | adgroup | impressions |
PMG~TestCampaign~Evergreen | PMG~TestAdgroup~Evergreen | 300 |
PMG~NewCampaign~Prospecting | PMG~NewAdgroup~Prospecting | 250 |
When the dimensions are set as Campaign and Adgroup, Datawarehouse will merge the new file into the current table as follows:
campaign | adgroup | impressions |
PMG~TestCampaign~Evergreen | PMG~TestAdgroup~Evergreen | 300 |
PMG~TestCampaign~Prospecting | PMG~TestAdgroup~Prospecting | 353 |
PMG~NewCampaign~Prospecting | PMG~NewAdgroup~Prospecting | 250 |
Notice how PMG~TestCampaign~Prospecting stayed in the database unharmed, and the Evergreen campaign was updated to include the new 300 impressions number.
Related articles
- How to enable Big Query for a custom alert
- How to name Datasource Columns
- How to manually upload data to an existing datasource
- How to archive and unarchive data sources
- How to create a manual datasource without validations
- How to setup a datasource that requires custom data
- How to Create a new datasource
- How to update datasource dimensions and metrics
- How to create a Smartsheet Datasource
- How to add a manual upload datasource