Alfred Shortcuts for Google Cloud BigQuery
For you, dear person who works on Google BigQuery every day and is always lost in many clicks in the Web UI around different projects and datasets, here's an Alfred Workflow to make your life a bit easier! 🤩
- Have Alfred with PowerPack installed
- Download the latest release of
alfred-bigquery-shortcuts.alfredworkflow
from the Releases page - Double click
- Enjoy 🍒
Before enjoying this workflow you need to run the bq-refresh
command.
This command will fetch the list of Google Cloud projects, BigQuery datasets and tables for which you have authenticated and
will cache this in your Mac. Depending on how many projects, datasets and tables you have, this command may take from a couple
of seconds to one minute.
NOTE 1: to make this workflow access the Google Cloud APIs, you need to have the gcloud
CLI installed and be
authenticated through gcloud auth application-default login
NOTE 2: the workflow defines a maximum number of tables per dataset that will be fetched. This is done on purpose to avoid
spending a lot of time fetching information from date-sharded tables (where each shard is a separate table). If you really
wish to fetch even more tables, increase the value of max_tables_per_dataset
from the "variables" section of the workflow.
NOTE 3: you need to run this command every time new datasets and tables are added to your projects
There are three simple and similar commands:
bq
: select project -> select dataset -> select table -> open the BigQuery UI on the selected tablebqd
: select project -> select dataset -> open the BigQUery UI on the selected datasetbqp
: select project -> open the BigQuery UI on the selected project
This is my first attempy of writing Go code and I think the code quality is really bad 🤢
Feel free to suggest improvements / new features!