bigquery-etl/sql_generators
Katie Windau 528df9c542
DENG-4684 add profile_group_id to feature_usage_v2 (#6200)
2024-09-13 19:01:46 +00:00
..
active_users_aggregates_v3 DENG-4220 Align AUA scheduler for mobile & desktop. (#5872) 2024-07-01 09:56:32 -07:00
active_users_deletion_requests Deng 3998 deprecate active users aggregates deletion requests (#5747) 2024-06-05 22:40:11 +02: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
events_daily Bug 1915728 - Reduce overactive clients filter value in events_daily queries (#6147) 2024-09-04 13:28:24 +02:00
experiment_monitoring Update experiment_search_aggregates to pick up metric configuration for telemetry (#5600) 2024-05-16 12:22:53 -07:00
feature_usage DENG-4684 add profile_group_id to feature_usage_v2 (#6200) 2024-09-13 19:01:46 +00:00
funnels Add login funnel by entrypoint (#6106) 2024-08-26 14:49:12 -07:00
glean_usage Fix skipping of apps in glean_usage (#6191) 2024-09-12 15:29:35 -07:00
mobile_kpi_support_metrics feat: include is_daily_user filter to ensure only new profiles are included (#6042) 2024-09-05 17:48:48 +02:00
search Fix mobile os version for search related tables (#6111) 2024-08-26 23:48:48 -04:00
search_v2 Fix mobile os version for search related tables (#6111) 2024-08-26 23:48:48 -04: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 Pass ID token to dryrun instances to speed things up (#6019) 2024-08-08 12:38:43 -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.