Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample DAG with SDK #2

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open

Sample DAG with SDK #2

wants to merge 1 commit into from

Conversation

Acuion
Copy link

@Acuion Acuion commented Sep 19, 2024

Added a simple DAG to show Integration with our SDK

@Acuion Acuion requested a review from cra September 19, 2024 17:15
@Acuion Acuion requested a review from a team as a code owner September 19, 2024 17:15
)
def sample_list_ch_clusters():
@task
def get_project_id():
Copy link
Contributor

@cra cra Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest changing this could to a dag parameter instead, see how it is used in https://github.com/doublecloud/sample-airflow-dags/blob/trunk/dags/sample_ch_insert.py#L25-L28

When using decorator, dag/params are accessible through context variables, see

))
print("Your CH clusters are:")
for cluster in response.clusters:
print(cluster)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but I was thinking if we can go even further and create connections for the user?

Here's how that is done with gcp sql query
https://github.com/apache/airflow/blob/8f7616c47d5a89da83dc0a565d86fd3f618f5612/tests/system/providers/google/cloud/cloud_sql/example_cloud_sql_query.py#L442

If we can do something similar, it would make it super-useful

Alternatively, if we want to just make this as a "print all stuff we have" I'd suggest adding more similar tasks to report clusters and other entities in the account — kafka, clickhouse, transfer endpoints

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also add a short note in README with a screenshot of a DAG structure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants