-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0a9fd3
commit 851564f
Showing
6 changed files
with
181 additions
and
5 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,91 @@ | ||
from typing import Any | ||
|
||
from airflow.utils.context import Context | ||
|
||
from cosmos.operators.base import DbtCompileMixin | ||
from cosmos.operators.local import ( | ||
DbtBuildLocalOperator, | ||
DbtDepsLocalOperator, | ||
DbtDocsAzureStorageLocalOperator, | ||
DbtDocsCloudLocalOperator, | ||
DbtDocsGCSLocalOperator, | ||
DbtDocsLocalOperator, | ||
DbtDocsS3LocalOperator, | ||
DbtLocalBaseOperator, | ||
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 DbtDocsCloudAirflowAsyncOperator(DbtDocsCloudLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsS3AirflowAsyncOperator(DbtDocsS3LocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsAzureStorageAirflowAsyncOperator(DbtDocsAzureStorageLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDocsGCSAirflowAsyncOperator(DbtDocsGCSLocalOperator): | ||
pass | ||
|
||
|
||
class DbtDepsAirflowAsyncOperator(DbtDepsLocalOperator): | ||
pass | ||
|
||
|
||
class DbtCompileAirflowAsyncOperator(DbtCompileMixin, DbtLocalBaseOperator): | ||
""" | ||
Executes a dbt core build command. | ||
""" | ||
|
||
def __init__(self, *args: Any, **kwargs: Any) -> None: | ||
kwargs["should_upload_compiled_sql"] = True | ||
super().__init__(*args, **kwargs) | ||
|
||
def execute(self, context: Context) -> None: | ||
self.build_and_run_cmd(context=context, cmd_flags=self.add_cmd_flags()) |
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