And save 80% in BigQuery storage cost!
Thanks for sharing! 🙌 Just ran it on one of our GCP projects. Potentially a few thousand dollars a year we can save 💸
Run at own risk, but it's pretty cool that you can wrap the query above in:
FOR resulting_row IN (
... the query with a filter to only include rows that save cost ...
) DO EXECUTE IMMEDIATE(resulting_row.command); END FOR;
to actually apply the command directly with the query. I find scripts like above quite powerful and potentially dangerous :)
thanks a lot Robert! FYI a small typo slip through on row 25: "compression_reate" instead of "compression_rate" ;)
Thanks for sharing! 🙌 Just ran it on one of our GCP projects. Potentially a few thousand dollars a year we can save 💸
Run at own risk, but it's pretty cool that you can wrap the query above in:
FOR resulting_row IN (
... the query with a filter to only include rows that save cost ...
) DO EXECUTE IMMEDIATE(resulting_row.command); END FOR;
to actually apply the command directly with the query. I find scripts like above quite powerful and potentially dangerous :)
thanks a lot Robert! FYI a small typo slip through on row 25: "compression_reate" instead of "compression_rate" ;)