Bigquery ETL
Перейти к файлу
Anna Scholtz 6b0b918cc6 Ignore user count threshold in opmon views 2022-03-15 14:54:29 -07:00
.circleci Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00:00
.github Add CODEOWNERS and restricted access datasets documentation (#2524) 2021-12-21 20:25:05 +00:00
.vscode Remove .vscode settings and add to gitignore (#1929) 2021-03-30 12:25:05 -04:00
bigquery_etl Ignore user count threshold in opmon views 2022-03-15 14:54:29 -07:00
dags Exclude partition identifier from sql file path for vpn agg tables (#2801) 2022-03-15 13:30:06 -07:00
docs Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00:00
script Add agg_type to the sample counts for desktop and glean, remove the extract sample counts query (#2772) 2022-03-02 15:51:20 -05:00
sql Exclude partition identifier from sql file path for vpn agg tables (#2801) 2022-03-15 13:30:06 -07:00
sql_generators Fix clients_last_seen joins 2022-03-01 11:58:38 -08:00
stored_procedures Improvements for CRC32 stored procedure 2020-01-21 14:58:24 -08:00
tests Allow stripe imports to include customer address (#2737) 2022-02-22 19:13:06 +00: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 Remove .vscode settings and add to gitignore (#1929) 2021-03-30 12:25:05 -04:00
.isort.cfg Automatically sort python imports (#1840) 2021-02-24 17:11:52 -05:00
.pre-commit-config.yaml Add mypy to list of pre-commit hooks (#1995) 2021-05-04 09:32:25 -07:00
.yamllint.yaml Move search to sql_generators/ 2022-01-03 14:15:02 -08:00
CODEOWNERS Add CODEOWNERS and restricted access datasets documentation (#2524) 2021-12-21 20:25:05 +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 Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00: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 Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00:00
bqetl Use --no-deps when installing compiled requirements files (#2752) 2022-02-24 21:36:47 +00:00
conftest.py Automatically sort python imports (#1840) 2021-02-24 17:11:52 -05:00
dags.yaml Bug 1753489 Remove ETL for Firefox Reality (#2767) 2022-03-02 15:03:21 +00:00
java-requirements.in Bump pyjnius from 1.4.0 to 1.4.1 (#2470) 2021-11-01 20:46:51 +00:00
java-requirements.txt Bump pyjnius from 1.4.0 to 1.4.1 (#2470) 2021-11-01 20:46:51 +00:00
netlify.toml Install mkdocs via requirements files (#2528) 2021-11-26 18:12:39 +00:00
pom.xml Bump zetasql.version from 2021.03.2 to 2021.09.1 (#2347) 2021-09-20 18:49:34 +00:00
pytest.ini Use zetasql to find sql dependencies (#1802) 2021-02-17 11:48:40 -08:00
requirements.in Bump pytest from 7.0.1 to 7.1.0 (#2797) 2022-03-14 14:37:17 -07:00
requirements.txt Bump pytest from 7.0.1 to 7.1.0 (#2797) 2022-03-14 14:37:17 -07:00
setup.py Move DAG generation to CI 2022-01-07 14:25:04 -08: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 suggestion

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

  • 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 11+ - (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. Download java dependencies
mvn dependency:copy-dependencies
# specify `<(echo mozilla-bigquery-etl)` to retain bqetl from `./bqetl bootstrap`
venv/bin/pip-sync --pip-args=--no-deps requirements.txt java-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.