Hi! 👋

Welcome to my website!

I'm Alessandro Marrella, I'm a Software Engineer and a Swiftie from the Reputation Era.
You can email me at hello @ this domain or chat with me in the socials linked below

Feed

📜 long form blog post

Avoiding select * in BigQuery

A quick workaround to avoid people doing "SELECT *" on your tables (which I consider harmful, see stackoverflow) in BigQuery is the following:

  1. Create a policy tag in the policy tags page. I create it under a new taxonomy "sql_rules", and call it "no_select_star"
  2. Once created, in the policy tag taxonomy page I enable the "enforce access control" option. If you need users to bypass this policy (e.g. needs to run bigquery copy operations) you can add the "fine graded reader" role to the principal associated with the policy tag in the same page.
  3. In the table you want to protect, add a dummy column (I call it "do_not_select_star") and assign it the policy tag
  4. Done! From now on, SELECT * will throw an error.

For more info see Google Cloud docs

💭 random thought

Just a quick update: I know I haven't being posting in a while, between end-of-year work, holidays, flu, and back to work I didn't have much time. Will go back to posting some tech stuff and drawing stuff soon.

2025-01-25 · 1 min