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