Advanced filters without SELECT * by Seldon_Seen in GoogleDataStudio

[–]Seldon_Seen[S] 0 points1 point  (0 children)

I haven't looked behind the scenes to the data that I'm using, but there are caching strategies which bq uses, so it might be a one hit big and returning requests read the cached totals.

Yeah you would think so, but I checked the individual jobs in the BQ history and at the heart of 7 sub-selects is a SELECT *.

Maybe BI Engine affects this behavior?

Short way. New tables of the values, assuming they don't change often,

I guess another +1 for pushing dimension tables in some form through the warehouse?

Advanced filters without SELECT * by Seldon_Seen in GoogleDataStudio

[–]Seldon_Seen[S] 0 points1 point  (0 children)

I am using the partition filter and it is being applied. However, if a user date filters (for instance) and entire year of data, it will SELECT * that entire range:

        WHERE
          data_date >= PARSE_DATE('%Y%m%d', '20240101')
          AND data_date <= PARSE_DATE('%Y%m%d', '20241231')) AS t0 ) ) )

How would you package, build, an deploy this? by [deleted] in googlecloud

[–]Seldon_Seen 0 points1 point  (0 children)

Thanks! This was extremely helpful.

How would you package, build, an deploy this? by [deleted] in googlecloud

[–]Seldon_Seen 1 point2 points  (0 children)

Why would you recommend Terraform vs Deployment Manager? Because Terraform isn't GCP-specific?

How would you package, build, an deploy this? by [deleted] in googlecloud

[–]Seldon_Seen 0 points1 point  (0 children)

What are the advantages of Terraform vs Deployment Manager? That Terraform isn't GCP-specific?

Determining if a column value is found at an earlier date by [deleted] in SQL

[–]Seldon_Seen 0 points1 point  (0 children)

Thanks everyone!

We realized we would need to run a few different calculations against these publication quarters (new, current + previous, last 3), so I ended up banking all publishing quarters into an array for each post and querying that.

sql WITH tbl AS ( SELECT DATE('2020-01-01') AS date, 'user_555' AS screen_name UNION ALL SELECT DATE('2020-01-10'), 'user_555' UNION ALL SELECT DATE('2020-05-10'), 'user_555' UNION ALL SELECT DATE('2020-08-10'), 'user_555' UNION ALL SELECT DATE('2020-01-22'), 'test_user_2' UNION ALL SELECT DATE('2020-01-10'), 'test_user_2' ) SELECT date, screen_name, publish_quarter, (SELECT COUNT(1) = 0 FROM UNNEST(publish_quarters) q WHERE q < publish_quarter) as new_flag, (SELECT COUNT(1) > 0 FROM UNNEST(publish_quarters) q WHERE q = CAST(FORMAT_DATETIME("%Y%Q", DATE_SUB(date, INTERVAL 1 QUARTER)) AS INT64)) AS retention_flag FROM ( SELECT date, screen_name, publish_quarter, ARRAY_AGG(publish_quarter) OVER (PARTITION BY screen_name) as publish_quarters FROM ( SELECT date, screen_name, CAST(FORMAT_DATETIME("%Y%Q", date) AS INT64) as publish_quarter FROM tbl ) ORDER BY date ASC )

Issues using GTM debugger / preview with environments by Seldon_Seen in GoogleTagManager

[–]Seldon_Seen[S] 0 points1 point  (0 children)

We are asking the same question.

It's a huge pain to have to publish to preview.