-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into optimize-dbt-virtualenv-reuse
- Loading branch information
Showing
33 changed files
with
1,632 additions
and
34 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
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
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,33 @@ | ||
from __future__ import annotations | ||
|
||
from airflow import DAG | ||
from airflow.utils.task_group import TaskGroup | ||
|
||
|
||
def get_dataset_alias_name(dag: DAG | None, task_group: TaskGroup | None, task_id: str) -> str: | ||
""" | ||
Given the Airflow DAG, Airflow TaskGroup and the Airflow Task ID, return the name of the | ||
Airflow DatasetAlias associated to that task. | ||
""" | ||
dag_id = None | ||
task_group_id = None | ||
|
||
if task_group: | ||
if task_group.dag_id is not None: | ||
dag_id = task_group.dag_id | ||
if task_group.group_id is not None: | ||
task_group_id = task_group.group_id | ||
task_group_id = task_group_id.replace(".", "__") | ||
elif dag: | ||
dag_id = dag.dag_id | ||
|
||
identifiers_list = [] | ||
|
||
if dag_id: | ||
identifiers_list.append(dag_id) | ||
if task_group_id: | ||
identifiers_list.append(task_group_id) | ||
|
||
identifiers_list.append(task_id) | ||
|
||
return "__".join(identifiers_list) |
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,67 @@ | ||
from cosmos.operators.local import ( | ||
DbtBuildLocalOperator, | ||
DbtCompileLocalOperator, | ||
DbtDocsAzureStorageLocalOperator, | ||
DbtDocsGCSLocalOperator, | ||
DbtDocsLocalOperator, | ||
DbtDocsS3LocalOperator, | ||
DbtLSLocalOperator, | ||
DbtRunLocalOperator, | ||
DbtRunOperationLocalOperator, | ||
DbtSeedLocalOperator, | ||
DbtSnapshotLocalOperator, | ||
DbtSourceLocalOperator, | ||
DbtTestLocalOperator, | ||
) | ||
|
||
|
||
class DbtBuildAirflowAsyncOperator(DbtBuildLocalOperator): | ||
pass | ||
|
||
|
||
class DbtLSAirflowAsyncOperator(DbtLSLocalOperator): | ||
pass | ||
|
||
|
||
class DbtSeedAirflowAsyncOperator(DbtSeedLocalOperator): | ||
pass | ||
|
||
|
||
class DbtSnapshotAirflowAsyncOperator(DbtSnapshotLocalOperator): | ||
pass | ||
|
||
|
||
class DbtSourceAirflowAsyncOperator(DbtSourceLocalOperator): | ||
pass | ||
|
||
|
||
class DbtRunAirflowAsyncOperator(DbtRunLocalOperator): | ||
pass | ||
|
||
|
||
class DbtTestAirflowAsyncOperator(DbtTestLocalOperator): | ||
pass | ||
|
||
|
||
class DbtRunOperationAirflowAsyncOperator(DbtRunOperationLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsAirflowAsyncOperator(DbtDocsLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsS3AirflowAsyncOperator(DbtDocsS3LocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsAzureStorageAirflowAsyncOperator(DbtDocsAzureStorageLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsGCSAirflowAsyncOperator(DbtDocsGCSLocalOperator): | ||
pass | ||
|
||
|
||
class DbtCompileAirflowAsyncOperator(DbtCompileLocalOperator): | ||
pass |
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
Oops, something went wrong.