bigquery-etl/sql_generators
Anna Scholtz 0dda2651a4
Fall back to running query to get view schema (#6035)
2024-08-08 16:32:28 -07: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 Include VPN iOS network extension app in VPN events ETLs. (#5677) 2024-05-29 17:01:33 -07: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 Dependabot/pip/black 24.1.1 fix (#5027) 2024-02-19 15:27:34 +01:00
funnels Fix event name to be correct (#5994) 2024-07-31 14:19:47 -07:00
glean_usage Fall back to running query to get view schema (#6035) 2024-08-08 16:32:28 -07:00
mobile_kpi_support_metrics feat: add new_profiles templates to mobile_kpi_support_metrics generator (#5988) 2024-08-06 11:15:55 +02:00
search RS 959 - Add OS breakouts (#5767) 2024-06-24 21:48:08 -04:00
search_v2 Add mobile_search_clients_daily_v2 with baseline pings data (#5977) 2024-07-25 19:57:56 -04:00
serp_events_v2 Update view for serp_events v2 (#5427) 2024-05-08 14:29:11 -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 [DENG-577] Create monitoring table for stable table expiration (#6009) 2024-08-02 16:53:34 -04:00
urlbar_events Fix DAG failures caused due to bad bool value (#5755) 2024-06-06 15:08:00 -04:00
use_counters Deng-2845: Remove default deprecated false (#5118) 2024-02-27 10:33:50 -08:00
README.md
__init__.py

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.