ETLMCPData Conveyance Works
Log in Start free
Guides

Upload etlmcp CSV exports to Looker Studio without duplicate rows

Why a second CSV upload doubles your Looker Studio totals, and how to keep headers and columns stable so every etlmcp export uploads cleanly.

Each etlmcp CSV export holds the pipeline's whole stored history, and Looker Studio's file upload adds every new file to the rows already in the dataset. If you upload this week's export next to last week's, every day that appears in both is counted twice. Remove the earlier file from the dataset before you add the new one, and keep the file's columns and header names fixed with a pipeline transform, so that each upload has the same structure as the last.

What an etlmcp CSV export contains

A CSV destination is a full delivery: when a run delivers, etlmcp takes every row it has stored for the source, not only the days the run pulled from the platform, applies the pipeline's rules and writes the result as one file. Each run's file is downloadable from its run page. So the newest export is always a complete copy of the history etlmcp has stored for the source, and older exports are older copies of the same rows.

The file is written as UTF-8 with commas between fields and one header row. The columns follow the rows themselves: the standard columns (date, network, account_id, campaign_name, impressions, clicks, cost, conversions and the rest) come first in a fixed order, and then any other fields in the order they first appear in the data. Fields a platform reports beyond the standard set are named extra.<key>, for example extra.sessions.

Why the second upload doubles your totals

Data Studio (formerly Looker Studio) treats extra files in an upload dataset as more rows, not as a replacement. Google's page says new data is appended rather than merged, and records repeated across your files are not removed.

You have two clean ways to refresh:

  • Remove the previous file from the dataset, add the new export, and reconnect the data source so Looker Studio reads it.
  • Create a new upload dataset from the new export and point your report at it.

Do not upload only part of the history to avoid duplicates by hand: platforms restate recent days, so the newest export has corrected figures for days an older file also covers.

Keep the structure identical

Every file in one upload dataset must have the same fields in the same order, and each row must have the same number of columns. To add or drop a field, Google says you must first delete all the files already uploaded to that dataset.

That matters for etlmcp because the column list is built from the data. If a platform starts returning a new extra field, it appears as a new column at the end, and the next upload no longer matches. Add a select rule to the pipeline's transform that names the fields you want, in order. A select rule fixes the columns: a field missing from the rows comes out as an empty cell rather than a missing column.

Header names Looker Studio accepts

Upload headers may hold only letters, numbers and underscores, must begin with a letter or an underscore, may be up to 128 characters long and must be unique. The dot in extra.sessions breaks the first rule. Add a rename rule that maps each extra field to a plain name, for example extra.sessions to sessions. The standard columns already use only lowercase letters and underscores.

A transform that renames, then selects:

[
  {"op": "rename", "map": {"extra.sessions": "sessions"}},
  {"op": "select", "fields": ["date", "network", "campaign_name", "impressions", "clicks", "cost", "conversions", "sessions"]}
]

Limits to plan around

Google lists these limits for file uploads:

  • 100 MB of file size per dataset
  • 2 GB of total upload storage per user
  • 100 uploads per dataset per day

Files must be UTF-8, or the upload fails with an invalid characters error, and fields must be separated by commas. etlmcp's export meets both. Because each export carries the full history, its size grows with the stored history and the number of campaigns or ads. A select rule that keeps fewer columns, or a filter rule that drops rows you never chart, keeps the file under the dataset limit.

If you outgrow uploads, a database destination such as Postgres lets Looker Studio read the table directly, which removes the delete-and-reupload step.

Related

Sources

  1. Upload CSV files to Data Studio — docs.cloud.google.com, checked