An open API service indexing awesome lists of open source software.

https://github.com/manesioz/airflow-without-code

Dynamically generate DAGs to ingest SQL files into BigQuery with one line of "code"
https://github.com/manesioz/airflow-without-code

airflow airflow-plugin bigquery python sql

Last synced: 2 months ago
JSON representation

Dynamically generate DAGs to ingest SQL files into BigQuery with one line of "code"

Awesome Lists containing this project

README

          

# airflow-without-code
Dynamically generate DAGs to run SQL files and ingest into BigQuery with one line of "code" at the header.

### Example usage

Given the directory:

.
├── ...
├── etl # ETL directory
│ ├── sql_script_1.sql # first sql file to ingest into BigQuery
│ ├── sql_script_2.sql # second sql file to ingest into BigQuery
│ └── airflow_without_code.py # airflow-without-code main python file
└── ...

Now you can easily manage simple `DAGs` for both `sql_script_1.sql` and `sql_script_2.sql` by including the configurable header:

```sql
--{"schedule_interval": "@weekly", "author": "Zachary Manesiotis", "catchup": true, "destination_table": "project.dataset.table"}

with fake_sql as (
select col
from table
)
...
```
in each of the `SQL` files.