Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change directory to generate private DAGs so sql_file_path values are relative to the repo root. #4668

Merged
merged 6 commits into from
Dec 11, 2023
17 changes: 9 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,27 +488,28 @@ jobs:
- run:
name: Generate SQL content
command: |
export PATH="$PWD/venv/bin:$PATH"
export PYTHONPATH="$PWD:$PYTHONPATH"
bqetl_script="$PWD/script/bqetl"
cd ~/private-bigquery-etl

mkdir -p /tmp/workspace/private-generated-sql

mkdir -p /tmp/workspace/private-generated-sql/dags
PATH="venv/bin:$PATH" script/bqetl dag generate \
$bqetl_script dag generate \
--dags-config dags.yaml \
--sql-dir ~/private-bigquery-etl/sql/ \
--output-dir /tmp/workspace/private-generated-sql/dags/

cp -r sql/ /tmp/workspace/private-generated-sql/sql
# Don't depend on dry run for PRs
PATH="venv/bin:$PATH" script/bqetl generate all \
--output-dir /tmp/workspace/private-generated-sql/sql/ \
--target-project moz-fx-data-shared-prod
PATH="venv/bin:$PATH" script/bqetl query render \
sean-rose marked this conversation as resolved.
Show resolved Hide resolved
$bqetl_script query render \
--sql-dir /tmp/workspace/private-generated-sql/sql/ \
--output-dir /tmp/workspace/private-generated-sql/sql/ \
/tmp/workspace/private-generated-sql/sql/
PATH="venv/bin:$PATH" script/bqetl dependency record \
$bqetl_script dependency record \
--skip-existing \
"/tmp/workspace/private-generated-sql/sql/"
PATH="venv/bin:$PATH" script/bqetl metadata update \
$bqetl_script metadata update \
--sql-dir /tmp/workspace/private-generated-sql/sql/ \
/tmp/workspace/private-generated-sql/sql/
- persist_to_workspace:
Expand Down