bigquery-etl/sql_generators
rzhao 65402717f2
Rz modify ios onboarding funnel (#6503)
* Create iOS_onboarding.toml

Added iOS_onboarding.toml - query for generating the underlying table in the iOS onboarding dashboard.

* Update iOS_onboarding.toml

* feat: remove locale from dimension list, it does not exist in the source table

* Delete sql_generators/funnels/configs/iOS_onboarding.toml

* update ios onboarding funnel

* break ios onboarding funnel into two smaller funnels

* break ios onboarding funnel into two smaller funnels (#6537)

* Temporarily add active_users v3 to codeowners until v4 backfill is completed. (#6534)

* chore(DO-1886): Add shredder mitigation to more tables (#6532)

* Add shredder mitigation to desktop eng & ret tables

* Add shredder mitigation to desktop new profile agg v1

* Add fenix_derived.funnel_retention_week_4_v1 to shredder mitigation

* Add urlbar_events_daily_eng_by_pos_v1 to shredder mitigation

* Add firefox_ios_derived.funnel_retention_week_4_v1 shredder mitigation

* Add desktop funnel installs v1 to shredder mitigation

* Add firefox_nondesktop_exact_mau28_v1

* Add shredder mitigation to urlbar_events_daily_v1

* chore(DO-1886): Add shredder mitigation to more tables (#6535)

* Add shredder mitigation to searchreport v1

* Add mobile search agg for search report v1 to shredder mitigation

* Add smoot usage fxa compressed v2 to shredder mitigation

* Add smoot usage new profiles comp v2 to shredder mitigation

* change types ofr created_at and job_created_at from STRING to DATE (#6536)

---------

Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
Co-authored-by: Katie Windau <153020235+kwindau@users.noreply.github.com>
Co-authored-by: Marlene Hirose <92952117+Marlene-M-Hirose@users.noreply.github.com>

* Use events_stream table

---------

Co-authored-by: kik-kik <kignasiak@mozilla.com>
Co-authored-by: Lucia <30448600+lucia-vargas-a@users.noreply.github.com>
Co-authored-by: Katie Windau <153020235+kwindau@users.noreply.github.com>
Co-authored-by: Marlene Hirose <92952117+Marlene-M-Hirose@users.noreply.github.com>
Co-authored-by: Anna Scholtz <anna@scholtzan.net>
2024-11-20 22:37:20 +00:00
..
active_users_aggregates_v3 Prepare active_users_aggregates for a backfill with shredder mitigation. (#6349) 2024-11-18 20:20:22 +00:00
active_users_aggregates_v4 Remove the scheduler for v4, as rthe tables need to be moved to production via a backfill with shredder mitigation. It will be added after the tables are moved to production. (#6530) 2024-11-19 19:41:19 +00:00
active_users_deletion_requests Switch to baseline beginning Aug 01st 2024 (#6425) 2024-10-31 19:11:36 +00:00
country_code_lookup Dependabot/pip/black 24.1.1 fix (#5027) 2024-02-19 15:27:34 +01:00
derived_view_schemas Pass ID token to dryrun instances to speed things up (#6019) 2024-08-08 12:38:43 -07:00
desktop_crashes Bug 1920544 Create view to union firefox desktop crashes (#6257) 2024-09-27 17:48:44 +00:00
events_daily Reduce overactive clients threshold in `events_daily_v1` ETLs (bug 1921117). (#6263) 2024-09-25 22:25:54 +00:00
experiment_monitoring [DENG-5931] Add partitioning to experiment_events_live_v1 (#6414) 2024-10-28 19:59:18 +00:00
feature_usage chore: update anicholson ownership (#6220) 2024-09-19 13:25:40 +00:00
funnels Rz modify ios onboarding funnel (#6503) 2024-11-20 22:37:20 +00:00
glean_usage Remove hardcoded dataset in baseline clients last seen check (#6514) 2024-11-18 20:38:11 +00:00
mobile_kpi_support_metrics chore(DO-1886): Add shredder_mitigation to mobile engagement and retention tables (#6538) 2024-11-20 20:31:05 +00:00
search_v2 Switch to baseline beginning Aug 01st 2024 (#6425) 2024-10-31 19:11:36 +00:00
serp_events_v2 DENG-4613 update serp_events_v2 generator to include profile_group_id (#6104) 2024-08-26 11:43:36 -05:00
stable_views DENG-4768 add 3 new columns to glean stable table views (#6390) 2024-10-23 13:53:52 -07:00
table_partition_expirations Include tables with no expirations in table_partition_expirations (#6084) 2024-08-22 18:04:31 +01:00
urlbar_events DENG-4607 add profile_group_id to urlbar_events_v2 (#6098) 2024-08-23 12:50:07 -05:00
use_counters Deng-2845: Remove default deprecated false (#5118) 2024-02-27 10:33:50 -08:00
README.md DENG-601 Update sql-generators README with deployment info. (#3562) 2023-02-02 18:48:43 +01:00
__init__.py Glean usage checks (#4445) 2023-10-17 17:03:41 -04:00

README.md

SQL generators

sql_generators/ contains scripts for generating SQL queries. Generated SQL query code should not be checked in to main. The scripts for generating SQL queries are executed by CI only and will are followed by generating Airflow DAGs.

Expected structure

The directories in sql_generators/ represent the generated queries and will contain all of the scripts and templates necessary to generate these queries. Each query-specific directory will contain a __init__.py file that contains the query generation logic. Optionally, a templates/ directory can be added which contains the Jinja templates queries are generated from.

Each __init__.py file needs to implement a generate() method that is configured as a click command. The bqetl CLI will automatically add these commands to the ./bqetl query generate command group.

After changes to a schema or adding new tables, the schema is automatically derived from the query and deployed the next day in DAG bqetl_artifact_deployment. Alternatively, it can be manually generated and deployed using ./bqetl generate all and ./bqetl query schema deploy.