-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ingestion/airflow-plugin): incorporated review comments and added…
… the test
- Loading branch information
1 parent
aba3d0f
commit c87c070
Showing
5 changed files
with
502 additions
and
110 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
34 changes: 34 additions & 0 deletions
34
...a-ingestion-modules/airflow-plugin/tests/integration/dags/dag_to_filter_from_ingestion.py
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,34 @@ | ||
from datetime import datetime | ||
|
||
from airflow import DAG | ||
from airflow.operators.bash import BashOperator | ||
|
||
from datahub_airflow_plugin.entities import Dataset, Urn | ||
|
||
with DAG( | ||
"dag_to_filter_from_ingestion", | ||
start_date=datetime(2023, 1, 1), | ||
schedule_interval=None, | ||
catchup=False, | ||
) as dag: | ||
task1 = BashOperator( | ||
task_id="task_dag_to_filter_from_ingestion_task_1", | ||
dag=dag, | ||
bash_command="echo 'task_dag_to_filter_from_ingestion_task_1'", | ||
inlets=[ | ||
Dataset(platform="snowflake", name="mydb.schema.tableA"), | ||
Urn( | ||
"urn:li:dataset:(urn:li:dataPlatform:snowflake,mydb.schema.tableC,PROD)" | ||
), | ||
Urn("urn:li:dataJob:(urn:li:dataFlow:(airflow,test_dag,PROD),test_task)"), | ||
], | ||
outlets=[Dataset("snowflake", "mydb.schema.tableD")], | ||
) | ||
|
||
task2 = BashOperator( | ||
task_id="task_dag_to_filter_from_ingestion_task_2", | ||
dag=dag, | ||
bash_command="echo 'task_dag_to_filter_from_ingestion_task_2'", | ||
) | ||
|
||
task1 >> task2 |
Oops, something went wrong.