- BigQuery templating cli app
- made for quickly copy/pasting airflow templated sql into BigQuery UI
- reads from a
mapping.json
file - can convert most built-in airflow template values
- support for an environment variable with
${env}
- create a folder
${HOME}/Documents/bqt
- create a
mappings.json
file with template names as keys and the desired unput as values
{
"params.project": "gk-africa-data-eu-${env}",
"params.web_project": "testscore-web",
"environment": "${env}"
}
file
(required)env
(optional), either "live", "dev", or "staging"isTest
(optional), read from themapping.json
in main packagequiet
(optional),isTerraform
(optional), switches from jinja templating ({{ }}
) to terraform (${}
)
# bqt <file> <env>
bqt users.sql live quiet
mapping.json
- templated values are read from the
mapping.json
file - keys are the templated values and values are the what you sub in