Luka Cempre Profile picture
Apr 20, 2023 7 tweets 3 min read Read on X
I have noticed an increasing amount of poor practices floating around regarding connecting #BigQuery with Looker/Data Studio that could cost you.

My top suggestions:
- utilize _table_suffix
- build reporting tables
- BI Engine
- Materialized Views
- Caching

Details in 🧵
1/5 When working with sharded tables take advantage of the _table_suffix. It will potentially save you from querying a column and querying multiple tables.

Good: SELECT _table_suffix as date, userId, location... From table_*
Bad: SELECT date, userId, location... FROM table_* 2 queries doing the exact s...
2/5 Reporting Tables provide a great step between raw data and viz tools. Especially when data does not get updated as often. In the BQ UI you can easily schedule their creation or use a combination of cloud logging, pub/sub and functions for event driven creation.
2*/5 Make sure to take advantage of partitioning and clustering when building viz tables. Even SELECT * LIMIT 10, will run better when tables are clustered.
3/5 BI Engine is an in-memory analysis service on top of BigQuery. It will cache data that is queried most frequently or data that you prefer cached. The size of the cache determines the monthly cost ~ $30 per GB of cache per month.

cloud.google.com/bigquery/docs/…
4/5 Materialized views are created as easily as the standard views, but precompute and cache the results of the query that defines them. Especially useful for streaming data since only the delta (difference from the last call) gets queried.

adswerve.com/blog/quick-ove…
5/5 Looker Studio has native caching. It is important to be aware of what it's doing and how to control it. #BigQuery as a source can have data freshness set between 1 minute and 12 hours.

support.google.com/looker-studio/…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Luka Cempre

Luka Cempre Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(