Wondering if anyone is suddenly seeing a problem querying a materialised view from DataStudio. It's been working successfully for a week, then today all charts return error (and variations for where other aggregation function like AVG() etc are)
No matching signature for aggregate function SUM for argument types: BYTES. Supported signatures: SUM(INT64); SUM(FLOAT64); SUM(NUMERIC) at [2:37]
The table schema type is INTEGER, and the matching DataStudio field is Integer, I believe approx aggregation are stored as byte sketches and somehow the DataStudio subquery of subquery of subquery is surfacing the type as bytes rather than as the schema type.
This is the generated DataStudio query;
SELECT * FROM (
SELECT clmn1_, clmn2_, clmn100000_, SUM(clmn3_) AS clmn100002_ FROM (
SELECT * FROM (
SELECT clmn3_, clmn1_, clmn2_, clmn0_ AS clmn100000_, clmn0_ AS clmn100001_ FROM (
SELECT t0.id_count AS clmn3_, t0.field1 AS clmn1_, t0.field2 AS clmn2_, t0.id_date AS clmn0_ FROM `prodject.dataset.agg_table_count` t0
)
) WHERE ((clmn100001_ >= DATE "2020-04-01") AND (clmn100001_ <= DATE "2020-06-30") AND (clmn2_ <> "Other"))
) GROUP BY clmn1_, clmn2_, clmn100000_
) LIMIT 20000000
If I trim the query back to after the SUM(clmn3_) everything works fine, the Integers for id_count look fine. I've been staring at the query and table and can't see anything wrong, am I going mad?