-
Notifications
You must be signed in to change notification settings - Fork 101
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
Deng 3996 add jinja config to snapshot #5729
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jinja templates aren't available at runtime anymore, but you can use query parameters here.
sql/moz-fx-data-shared-prod/braze_external/users_previous_day_snapshot_v1/script.sql
Outdated
Show resolved
Hide resolved
sql/moz-fx-data-shared-prod/braze_external/users_previous_day_snapshot_v1/metadata.yaml
Outdated
Show resolved
Hide resolved
…snapshot_v1/script.sql Co-authored-by: Anna Scholtz <[email protected]>
…snapshot_v1/metadata.yaml Co-authored-by: Anna Scholtz <[email protected]>
This comment has been minimized.
This comment has been minimized.
@@ -19,3 +19,5 @@ bigquery: | |||
scheduling: | |||
dag_name: bqetl_braze | |||
date_partition_parameter: null | |||
parameters: | |||
- "snapshot_interval:INT64:1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok but ... can you overwrite it if you hardcode it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not saying you can't ... just not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can't. you need to define available parameters in Airflow like this: https://github.com/mozilla/telemetry-airflow/blob/5254b94e51020991691a88fb09f8fe43565fc23d/dags/operational_monitoring_backfill.py#L32-L60
But currently the generation logic doesn't support this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually one thing to try that could work:
- "snapshot_interval:INT64:1" | |
- "snapshot_interval:INT64:{{ dag_run.conf.get('snapshot_interval', 1) }}" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Integration report for "Update sql/moz-fx-data-shared-prod/braze_external/users_previous_day_snapshot_v1/script.sql"
|
@@ -2,7 +2,5 @@ DROP SNAPSHOT TABLE `moz-fx-data-shared-prod.braze_external.users_previous_day_s | |||
|
|||
CREATE SNAPSHOT TABLE `moz-fx-data-shared-prod.braze_external.users_previous_day_snapshot_v1` CLONE `moz-fx-data-shared-prod.braze_derived.users_v1` FOR SYSTEM_TIME AS OF TIMESTAMP_SUB( | |||
CURRENT_TIMESTAMP(), | |||
INTERVAL 12 HOUR | |||
INTERVAL snapshot_interval HOUR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INTERVAL snapshot_interval HOUR | |
INTERVAL @snapshot_interval HOUR |
Goal:
Default snapshot interval to 1 HOUR w/ ability to override the snapshot_interval value when triggering the dag w/ config
Checklist for reviewer:
<username>:<branch>
of the fork as parameter. The parameter will also show upin the logs of the
manual-trigger-required-for-fork
CI task together with more detailed instructions.For modifications to schemas in restricted namespaces (see
CODEOWNERS
):┆Issue is synchronized with this Jira Task