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

Reuse connections accross entire Dag #647

Open
DanMawdsleyBA opened this issue Nov 3, 2023 · 3 comments
Open

Reuse connections accross entire Dag #647

DanMawdsleyBA opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels
area:profile Related to ProfileConfig, like Athena, BigQuery, Clickhouse, Spark, Trino, etc epic-assigned
Milestone

Comments

@DanMawdsleyBA
Copy link
Contributor

I have run into issues when running an airflow dag with multiple tasks running in parallel which has caused tasks to hang waiting on a connection. As each tasks opens up 3 connections each it might be worth seeing if those connections can be reused across multiple tasks perhaps some sort of setup and teardown task (Airflow 2.7). Could also be extended to deal with initial profile mapping setup also

I have raised a separate issue on the dbt snowflake repo to see if there is anything possible within dbt itself to help manage these connections better.
dbt-labs/dbt-snowflake#824

@tatiana tatiana added the area:profile Related to ProfileConfig, like Athena, BigQuery, Clickhouse, Spark, Trino, etc label Nov 8, 2023
@tatiana
Copy link
Collaborator

tatiana commented Nov 8, 2023

@DanMawdsleyBA I've been thinking about this issue. Is it only happening when running models?

We could consider using an Airflow Snowflake (potentially async) operator to run the compiled SQL file using Cosmos. We could experiment with this using:
https://astronomer.github.io/astronomer-cosmos/configuration/render-config.html#customizing-how-nodes-are-rendered-experimental

We may need to add the compiled SQL to the DbtNode definition.

If we see this approach is successful, we could consider having a Cosmos.AIRFLOW execution mode, where we'd attempt to use native Airflow operators to communicate with the database.

@tatiana tatiana modified the milestones: 1.3.1, 1.4.0 Jan 9, 2024
@tatiana tatiana modified the milestones: 1.4.0, 1.5.0 Mar 21, 2024
@tatiana
Copy link
Collaborator

tatiana commented May 14, 2024

This is likely associated to the original request: #925

@tatiana
Copy link
Collaborator

tatiana commented May 17, 2024

We'll be doing the following ticket, and hopefully, the original issue will be solved:

  1. Change how the profiles.yml is created when using mocked profiles  #924
  2. Cache profiles.yml file when using Cosmos ProfileMapping #925

@tatiana tatiana added triage-needed Items need to be reviewed / assigned to milestone and removed triage-needed Items need to be reviewed / assigned to milestone labels May 17, 2024
@tatiana tatiana added lgtm This PR has been approved by a maintainer epic-assigned and removed lgtm This PR has been approved by a maintainer labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:profile Related to ProfileConfig, like Athena, BigQuery, Clickhouse, Spark, Trino, etc epic-assigned
Projects
None yet
Development

No branches or pull requests

3 participants