Note If this is your first time checking out bqup, you might want to try out Dataform or dbt instead!
bqup is a backup tool for BigQuery projects. It can export a BigQuery project's structure and source code while mimicking the hierarchy of datasets and tables.
For the full story of why we made bqup, check out our blog post!
bqup can be installed using pip
.
pip install bqup
Alternatively, you can also clone the repository then run install
.
git clone https://github.com/thinkingmachines/bqup.git
cd bqup
python3 setup.py install
You can list down the options by running bqup --help
.
bqup [-p PROJECT_ID] [-d TARGET_DIR] [-fvxr] [-e REGEX]
Options:
-p PROJECT_ID, --project PROJECT_ID Project ID to load. If unspecified,
defaults to current project in
configuration.
-d TARGET_DIR, --dir TARGET_DIR The target directory where the project
will be written. Defaults to current
timestamp.
-f --force Overwrite target directory if it exists.
-v --verbose Print a summary of the loaded project.
-x --schema Export table schemata as json.
-r --routine Include routines in export.
-e REGEX, --regex REGEX Regex pattern to filter datasets to be exported.
-
Set up
gcloud
to run with your personal account (aka run with scissors). -
Set up application-default.
gcloud auth application-default login
-
Install
wheel
.pip3 install wheel
-
Install bqup.
pip3 install -e .
Alternatively, you can also install it using:
python3 setup.py develop
-
Run bqup (see Usage).
Check out bqup-starter to set up regular bqups using GitHub's workflows!
Run make test
to try a test upload.
Run make dist
to upload a distribution.
Both of these will call make build
, which rebuilds the package locally.
Thanks to all these wonderful people who've helped out with bqup:
Jess | Ram | Pepe Berba | Tim Pron | Enzo | Ardie |
bqup is no longer being maintained
- There are currently no plans to maintain this project.
- Thinking Machines does not make any guarantees about the quality of the software.