-
Notifications
You must be signed in to change notification settings - Fork 27
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
57be9e7
commit b181c21
Showing
5 changed files
with
138 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from datetime import datetime | ||
|
||
from airflow import DAG | ||
|
||
from astronomer.providers.core.sensors.external_task import ExternalDeploymentSensor | ||
|
||
with DAG( | ||
dag_id="example_astro_task", | ||
start_date=datetime(2022, 1, 1), | ||
schedule=None, | ||
catchup=False, | ||
tags=["example", "async", "core"], | ||
) as dag: | ||
ExternalDeploymentSensor( | ||
task_id="test", | ||
deployment_id="clpccxlbs45772d7yz84be4ykx", | ||
workspace_id="cll0nk0c3003u01kd092pghag", | ||
organization_id="cll0nj92h00iu01j51htnafwh" | ||
) |
Empty file.
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,29 @@ | ||
from typing import Any | ||
|
||
from airflow.hooks.base import BaseHook | ||
|
||
|
||
class AstroHook(BaseHook): | ||
conn_name_attr = "astro_cloud_conn_id" | ||
default_conn_name = "astro_cloud_default" | ||
conn_type = "Astro Cloud" | ||
hook_name = "Astro Cloud" | ||
|
||
@classmethod | ||
def get_connection_form_widgets(cls) -> dict[str, Any]: | ||
return {} | ||
|
||
@classmethod | ||
def get_ui_field_behaviour(cls) -> dict[str, Any]: | ||
return { | ||
"hidden_fields": ["host", "login", "port", "schema", "extra"], | ||
"relabeling": { | ||
"password": "Astro Cloud API Token", | ||
}, | ||
"placeholders": { | ||
"password": "ey...xz.ey...fq.tw...ap", | ||
}, | ||
} | ||
|
||
def get_conn(self) -> Any: | ||
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
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