ETLMCPData Conveyance Works
Log in Start free
Guides

Why a Looker Studio report still shows old numbers after an etlmcp run

Data Studio (formerly Looker Studio) serves cached results until each data source's freshness interval runs out. How to set it, or refresh by hand, after a run.

When an etlmcp run has finished and your report still shows yesterday's numbers, the report is almost always reading Looker Studio's cache, not your table. Data Studio (formerly Looker Studio), which Google now brands Data Studio, keeps the results of a report's queries in memory and reuses them until the data source's data freshness interval runs out. Until then, nothing new is read from your database, however recently etlmcp wrote to it. You fix it in one of two ways: shorten the data source's freshness setting so the cache expires soon after your pipeline's run hour, or refresh the report by hand after a run.

How the cache decides what you see

Each data source in a report has a freshness setting. When a chart sends a query that the report has already answered and the interval has not yet passed, the report answers from memory. Only when the interval has passed does it go back to the database.

The options depend on the connector behind the data source:

Data source Freshness options
PostgreSQL, BigQuery, MySQL, Cloud SQL for MySQL, SQL Server, Amazon Redshift, Cloud Storage every 1 to 50 minutes, or every 1 to 12 hours
Google Sheets every 15 minutes (the default), 1 hour, 4 hours or 12 hours
Google Analytics every 1, 4 or 12 hours (12 by default)
Google Ads, Search Console and other Google marketing products every 12 hours, fixed

Google's worked example describes a BigQuery source left at a 12-hour default, so check what your source is set to rather than assuming a short interval. Extracted data sources have no freshness setting at all.

Why a finished run is not enough

A pipeline runs once a day at its hour, in its own timezone. A new pipeline gets hour 6 in UTC unless you choose otherwise, and the scheduler looks for due pipelines every 5 minutes, so a run is queued within a few minutes of its hour. See the pipeline schedule.

With the PostgreSQL destination, each run deletes the pipeline's own rows for the dates it covers and inserts the new rows, then commits. Your table is up to date the moment the run shows as succeeded. Looker Studio does not know that. If the data source was last queried an hour before the run and its freshness is 12 hours, the report keeps serving the earlier numbers for up to another 11 hours.

Routine runs also rewrite recent days, not just add a new one: each sync pulls a trailing window again to pick up platform restatements (see the trailing window), so the cached spend for last week can differ from what your table holds now, not only today's row.

Set freshness to match the run

  1. Edit the data source.
  2. Open Data freshness on the data source's configuration page.
  3. Under Check for fresh data, choose the new interval.
  4. Save with Set Data Freshness.

If your pipeline runs at 6:00 UTC and finishes within the hour, an interval of 1 hour means anyone opening the report by mid-morning UTC sees the new figures. A 12-hour interval can carry the old figures well into the afternoon. Shorter intervals send more queries to your PostgreSQL server, so do not go shorter than you need for a table that changes once a day.

Two details change how far one setting reaches:

  • Credentials. With the owner's credentials, all viewers share one cache. With viewer's credentials, each viewer has their own, so one person's refresh does not help another.
  • Blends. A blended data source uses the shortest interval among the sources in it. A Sheets source at 15 minutes blended with a table at 4 hours refreshes every 15 minutes.

Refresh by hand after a backfill

After a backfill or a run you started by hand, refresh the report instead of waiting:

  • An editor opens the report, chooses More options, then Refresh data. This refreshes every data source in the report and resets their freshness clocks.
  • Viewers can refresh only if an editor has turned on Viewer data refresh in the report settings. They can then refresh a single chart from its right-click menu, or use a button set to the Refresh data action.
  • There is a one-minute cooldown. A refresh within a minute of the previous one does nothing, whichever method you use.
  • Viewers of an embedded report cannot refresh at all; they get new data only when the freshness interval runs out.

Auto-refresh does not bypass the cache

A report's auto-refresh setting re-runs the charts on a timer, but it does not change any data source's freshness. If auto-refresh fires every 15 minutes and the data source's interval is 12 hours, every auto-refresh is answered from memory. Lower the data source's freshness first; auto-refresh then only decides how often an open report picks up what the cache already holds.

Other destinations

The Google BigQuery and Google Sheets destinations are coming. Looker Studio's settings for those sources are listed above, and Google notes that BigQuery's usual query charges apply each time a refresh reaches the database, manual or automatic. For the destinations you can use today, see PostgreSQL and how a run replaces rows.

Related

Sources

  1. Manage data freshness — docs.cloud.google.com, checked