Bigquery ETL
Перейти к файлу
Alexander 588d468dc8
Hoist schemas in SQL tests up to table dir (#3145)
2022-08-17 13:11:24 -04:00
.circleci Remove scripts that have been replaced by CLI 2022-07-19 08:08:49 -07:00
.github Update dependabot configuration to use @quiiver (#3106) 2022-07-27 16:08:14 +00:00
.vscode Remove .vscode settings and add to gitignore (#1929) 2021-03-30 12:25:05 -04:00
bigquery_etl Hoist schemas in SQL tests up to table dir (#3145) 2022-08-17 13:11:24 -04:00
dags Set `telemetry_derived.rolling_cohorts_v1` date partition offset to match upstream tables. (#3146) 2022-08-12 12:57:13 -07:00
docs Hoist schemas in SQL tests up to table dir (#3145) 2022-08-17 13:11:24 -04:00
script Remove scripts that have been replaced by CLI 2022-07-19 08:08:49 -07:00
sql Add Windows 10 22H2 update to aggregates 2022-08-16 15:30:00 -04:00
sql_generators Don't overwrite existing files in glean_usage generation (DENG-210) (#3149) 2022-08-16 16:37:32 +00:00
src/main/java/com/mozilla/telemetry Reapply "Update to zetasql 2022.02.1 (#2862)" (#2881) 2022-04-07 14:02:20 -07:00
tests Hoist schemas in SQL tests up to table dir (#3145) 2022-08-17 13:11:24 -04:00
.bigqueryrc Create ~/.bigqueryrc without GCLOUD_SERVICE_KEY (#112) 2019-05-01 13:38:31 -07:00
.dockerignore Use zetasql to get dependencies for dag generation (#1817) 2021-02-18 17:49:46 -05:00
.eslintrc.yml Ran YAMLlint on all yaml files and resolved linting issues (fixes #1297) (#1481) 2020-10-29 17:24:55 -07:00
.flake8 Dryrun stored procedures (#1367) 2020-10-01 16:48:28 -04:00
.gitignore Update bigquery-etl cookbooks (#2935) 2022-05-04 11:10:34 +02:00
.isort.cfg Automatically sort python imports (#1840) 2021-02-24 17:11:52 -05:00
.pre-commit-config.yaml Bump click from 8.0.4 to 8.1.0 (#2838) 2022-03-29 20:46:31 +02:00
.yamllint.yaml Move search to sql_generators/ 2022-01-03 14:15:02 -08:00
CODEOWNERS DSRE-695 Remove search-terms restrictions from quicksuggest ETL (#2908) 2022-06-21 20:44:30 +00:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#50) 2019-03-30 10:01:54 -07:00
CONTRIBUTING.md Add CODEOWNERS and restricted access datasets documentation (#2524) 2021-12-21 20:25:05 +00:00
Dockerfile Specify pyjnius in `requirements.in` (#2924) 2022-04-29 12:23:47 -07:00
GRAVEYARD.md Remove asn_aggregates ETL (#2580) 2021-12-15 18:28:29 +00:00
LICENSE Add MPL license (#2353) 2021-09-20 17:59:47 +00:00
README.md Specify pyjnius in `requirements.in` (#2924) 2022-04-29 12:23:47 -07:00
bqetl Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00:00
conftest.py Reapply "Update to zetasql 2022.02.1 (#2862)" (#2881) 2022-04-07 14:02:20 -07:00
dags.yaml Set owners for Contextual Services tasks (#3048) 2022-07-21 20:18:23 +00:00
netlify.toml Fail Netlify build if any subcommand fails (#2926) 2022-04-29 16:26:00 -04:00
pom.xml Bump zetasql.version from 2022.04.1 to 2022.08.1 (#3154) 2022-08-17 16:36:25 +00:00
pytest.ini Use zetasql to find sql dependencies (#1802) 2021-02-17 11:48:40 -08:00
requirements.in Bump jsonschema from 4.9.1 to 4.10.0 (#3153) 2022-08-17 16:21:46 +00:00
requirements.txt Bump jsonschema from 4.9.1 to 4.10.0 (#3153) 2022-08-17 16:21:46 +00:00
setup.py Specify pyjnius in `requirements.in` (#2924) 2022-04-29 12:23:47 -07:00

README.md

CircleCI

BigQuery ETL

This repository contains Mozilla Data Team's:

  • Derived ETL jobs that do not require a custom container
  • User-defined functions (UDFs)
  • Airflow DAGs for scheduled bigquery-etl queries
  • Tools for query & UDF deployment, management and scheduling

For more information, see https://mozilla.github.io/bigquery-etl/

Quick Start

Apple Silicon (M1) user requirement

Enable Rosetta mode for your terminal BEFORE installing below tools using your terminal. It'll save you a lot of headaches. For tips on maintaining parallel stacks of python and homebrew running with and without Rosetta, see blog posts from Thinknum and Sixty North.

Pre-requisites

  • Pyenv (optional) Recommended if you want to install different versions of python, see instructions here. After the installation of pyenv, make sure that your terminal app is configured to run the shell as a login shell.
  • Homebrew (not required, but useful for Mac) - Follow the instructions here to install homebrew on your Mac.
  • Python 3.8+ - (see this guide for instructions if you're on a mac and haven't installed anything other than the default system Python).
  • Java JDK 8+ - (required for some functionality, e.g. AdoptOpenJDK) with $JAVA_HOME set.
  • Maven - (needed for downloading jar dependencies). Available via your package manager in most Linux distributions and from homebrew on mac, or you can install yourself by downloading a binary and following maven's install instructions.

GCP CLI tools

  • For Mozilla Employees or Contributors (not in Data Engineering) - Set up GCP command line tools, as described on docs.telemetry.mozilla.org. Note that some functionality (e.g. writing UDFs or backfilling queries) may not be allowed.
  • For Data Engineering - In addition to setting up the command line tools, you will want to log in to shared-prod if making changes to production systems. Run gcloud auth login --update-adc --project=moz-fx-data-shared-prod (if you have not run it previously).

Installing bqetl

  1. Clone the repository
git clone git@github.com:mozilla/bigquery-etl.git
cd bigquery-etl
  1. Install the bqetl command line tool
./bqetl bootstrap
  1. Install standard pre-commit hooks
venv/bin/pre-commit install
  1. Build and install java dependencies
mvn package
# specify `<(echo mozilla-bigquery-etl)` to retain bqetl from `./bqetl bootstrap`
venv/bin/pip-sync --pip-args=--no-deps requirements.txt <(echo mozilla-bigquery-etl)

Finally, if you are using Visual Studio Code, you may also wish to use our recommended defaults:

cp .vscode/settings.json.default .vscode/settings.json

And you should now be set up to start working in the repo! The easiest way to do this is for many tasks is to use bqetl. You may also want to read up on common workflows.