-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Features/#822 low flex scenario
- Loading branch information
Showing
4 changed files
with
454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""The central module to create low flex scenarios | ||
""" | ||
from airflow.operators.postgres_operator import PostgresOperator | ||
from sqlalchemy.ext.declarative import declarative_base | ||
import importlib_resources as resources | ||
|
||
from egon.data.datasets import Dataset | ||
|
||
|
||
Base = declarative_base() | ||
|
||
|
||
class LowFlexScenario(Dataset): | ||
def __init__(self, dependencies): | ||
super().__init__( | ||
name="low_flex_scenario", | ||
version="0.0.0", | ||
dependencies=dependencies, | ||
tasks=( | ||
{ | ||
PostgresOperator( | ||
task_id="low_flex_eGon2035", | ||
sql=resources.read_text( | ||
__name__, "low_flex_eGon2035.sql" | ||
), | ||
postgres_conn_id="egon_data", | ||
autocommit=True, | ||
), | ||
}, | ||
), | ||
) |
Oops, something went wrong.