# NOTE: This is an auto-generated file. Please do not edit this file manually.
{% from 'macros/load_file.py.jinja2' import load_file -%}
{% from 'macros/transform_file.py.jinja2' import transform_file -%}
from pathlib import Path

from airflow import DAG
from airflow.utils import timezone
from astro import sql as aql
from astro.constants import FileType
from astro.files import File
from astro.table import Metadata, Table

DAGS_FOLDER = Path(__file__).parent.as_posix()

with DAG(
    dag_id="{{ dag.dag_id }}",
    start_date=timezone.parse("{{ dag.start_date }}"),
    schedule_interval=None,
) as dag:
    {%- for workflow_file in dag.sorted_workflow_files() %}
    {%- if workflow_file.operator_name == 'load_file' %}
    {{ load_file(workflow_file, dag)|indent(width=4) }}
    {%- elif workflow_file.operator_name == 'transform_file' %}
    {{ transform_file(workflow_file, dag)|indent(width=4) }}
    {%- endif %}
    {%- endfor %}
