bigquery-etl/sql_generators
Anna Scholtz db4bd02f61 Fix clients_last_seen joins 2022-03-01 11:58:38 -08:00
..
derived_view_schemas Skip views to stable tables and UDFs; Dynamically extract view refs (#2663) 2022-01-17 13:38:02 -05:00
events_daily Use generate all command in CI 2022-01-07 14:25:04 -08:00
experiment_monitoring Use generate all command in CI 2022-01-07 14:25:04 -08:00
feature_usage Changed feature_usage string to number comparisons (#2666) 2022-01-17 16:44:45 -05:00
glean_usage Fix clients_last_seen joins 2022-03-01 11:58:38 -08:00
search Use generate all command in CI 2022-01-07 14:25:04 -08:00
stable_views Fix schema generation when generating SQL 2022-01-06 09:05:45 -08:00
README.md Add docs for sql_generators/ 2022-01-03 14:15:02 -08: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.