This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This query will return back the project, location, job_type, and a counter of the number of jobs running in the combination | |
* of them for all projects included in the BQ audit log. | |
* | |
* This will assist in tracking down jobs running outside of expected regions or show an overview of where job types are | |
* are running throughout your organization. | |
* | |
* Instructions: | |
* Replace <project_id> and <audit_log_dataset> with the project and dataset name where your BQ audit log sink is located. | |
* If you have not created one yet, follow the instructions located here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This query will look at a single project (by default in US multi-region) and | |
* calculate the logical and physical billing prices for each table in all datasets | |
* contained inside of it then provide a recommendation on if it is better to put it | |
* into a dataset that uses the logical (uncompressed) or physical (compressed) | |
* storage billing models. | |
* | |
* Physical (also called compressed) Storage went GA on July 5, 2023. It is set at | |
* the dataset level, so if two or more tables are better suited for different | |
* billing models in the same dataset it may be best to split them into separate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
usage() { | |
cat <<EOF |