Missing Date Range control on Postgresql Connector for Looker

Hi all,

I’m trying to replicate a report that previously used the BigQuery connector (with native date range pushdown) but now needs to pull data from AlloyDB via the native PostgreSQL connector.

**Issue:** When using Custom Query mode and referencing the date range parameters `$DS_START_DATE` / `$DS_END_DATE` (with PostgreSQL casting, e.g. `‘$DS_START_DATE’::DATE`), Looker Studio throws a System Error before the query even reaches the database (Error IDs: 04578c6e, 04f8fd74).

**What I tested:** - Custom Query with `$DS_START_DATE` / `$DS_END_DATE` + casting → System Error (crashes immediately) - Direct table connection (no custom query) → report appears to pull the entire table regardless of the Date Range Control selection - Workaround: static `WHERE part_date >= CURRENT_DATE - INTERVAL ‘X days’` in Custom Query → works, but is NOT dynamic (ignores the report’s date range control)

**Question:** 1. Does the native PostgreSQL connector actually support `$DS_START_DATE` / `$DS_END_DATE` in Custom Query mode? I couldn’t find this confirmed anywhere in the documentation. 2. If supported, what is the correct syntax/casting to avoid the System Error? 3. If not supported, is this a known limitation, and is there a workaround to get dynamic date-range pushdown to a PostgreSQL/AlloyDB source (similar to how the BigQuery connector handles it)?

This is currently blocking a migration from BigQuery to AlloyDB as the report’s underlying data source. Any guidance from the community or Product Experts would be greatly appreciated. Thanks!

Hi there!

Custom query parameters, such as @DS_START_DATE, are only supported for the BigQuery connector. (Note that they are prefixed with @, not $).

As a workaround, use a Date Range Control in the report and make sure that your custom SQL returns a recognizable standard Date or Timestamp column. Data Studio will perform standard date range filtering on this dataset automatically.

Why this works:

Data Studio takes your custom SQL and uses it as an inner select statement. Any filters applied by a Date Range Control on the dashboard are applied as a WHERE clause on the outer query generated by Data Studio.

Hope this helps!