bigquery-etl/sql_generators
kik-kik b7b0fbab5e
tweak(): making the active_users_aggregates checks more lenient (#4714)
* making the active_users_aggregates checks more lenient

* reformated sql generator templates for active users checks

* implementing lucia-vargas-a feedback from PR#4714
2023-12-15 16:12:52 +01:00
..
active_users tweak(): making the active_users_aggregates checks more lenient (#4714) 2023-12-15 16:12:52 +01:00
active_users_deletion_requests DENG 1051 Shredder Prototype (#4677) 2023-12-12 14:30:22 +01:00
country_code_lookup Adding 3 more Google Analytic country spellings. (#3686) 2023-03-27 14:12:37 -04:00
derived_view_schemas DS-2642 - Add plan, product, and customer shipping info to stripe itemized report (#3998) 2023-10-10 10:33:31 -07:00
events_daily Include VPN iOS native Glean events in VPN ETLs. (#4269) 2023-09-12 17:14:00 -07:00
experiment_monitoring DENG-476 - Update experiment aggregates ETL to reference main_v5 (#4435) 2023-10-26 10:12:19 -07:00
feature_usage Split main_1pct (#4022) 2023-07-05 13:00:29 -07:00
funnels Firefox android onboarding funnel dataset (#4479) 2023-12-14 12:14:02 -08:00
glean_usage Bug 1870036 - Remove failing check (#4709) 2023-12-15 08:56:26 -05:00
search Change `bqetl format` to improve readability of `CASE` statements (#3546) 2023-02-03 14:35:59 -08:00
serp_events DENG1546 - Fix bqetl_serp DAG failure (#4429) 2023-10-17 15:51:48 -04:00
stable_views Revert "Define `event_monitoring_live_v1` views in `view.sql` files (#4576)" (#4680) 2023-12-11 10:15:30 -08:00
urlbar_events Fix num_chars_typed in urlbar_events schema (#4607) 2023-11-27 16:10:08 -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.