| Total Complexity | 1 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """The central module to create low flex scenarios |
||
| 2 | |||
| 3 | """ |
||
| 4 | from airflow.operators.postgres_operator import PostgresOperator |
||
| 5 | from sqlalchemy.ext.declarative import declarative_base |
||
| 6 | import importlib_resources as resources |
||
| 7 | |||
| 8 | from egon.data.datasets import Dataset |
||
| 9 | |||
| 10 | |||
| 11 | Base = declarative_base() |
||
| 12 | |||
| 13 | |||
| 14 | class LowFlexScenario(Dataset): |
||
| 15 | def __init__(self, dependencies): |
||
| 16 | super().__init__( |
||
| 17 | name="low_flex_scenario", |
||
| 18 | version="0.0.0", |
||
| 19 | dependencies=dependencies, |
||
| 20 | tasks=( |
||
| 21 | { |
||
| 22 | PostgresOperator( |
||
| 23 | task_id="low_flex_eGon2035", |
||
| 24 | sql=resources.read_text( |
||
| 25 | __name__, "low_flex_eGon2035.sql" |
||
| 26 | ), |
||
| 27 | postgres_conn_id="egon_data", |
||
| 28 | autocommit=True, |
||
| 29 | ), |
||
| 33 |