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

[ADAP-922] [Feature] Passing user's Application name to Snowflake session #791

Closed
3 tasks done
v4mishra opened this issue Sep 28, 2023 · 4 comments
Closed
3 tasks done
Labels

Comments

@v4mishra
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-snowflake functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Usually organizations need some way of tracking usage / queries to Databricks/Snowflake databases. One way of doing that is setting teams/modules name in database connection / session object (via user_agent_entry).

When we create a connection using dbt, dbt sets its own details while creating a connection to real database.
For snowflake see code where we are hard-coding 'dbt' to application parameter when using snowflake python connector. Due to this we cannot override/append our details.

dbt-databricks has a good approach. It allows setting 'DBT_DATABRICKS_INVOCATION_ENV' which is later on appended to 'user_agent_entry' string..

Following databricks like approach in dbt-snowflake will also help us.

Describe alternatives you've considered

Suggestion is mentioned above. Provide a way to append additional info to 'application' variable by using any environment variable.

Who will this benefit?

Users who use dbt to connect to Snowflake and need some way of metering/tracking the queries/usage of Snowflake by setting an application/user_agent string.

Are you interested in contributing this feature?

No response

Anything else?

I asked similar query here as well - https://discourse.getdbt.com/t/application-name-or-useragent-info-to-snowflake/10031

@v4mishra v4mishra added enhancement New feature or request triage labels Sep 28, 2023
@github-actions github-actions bot changed the title [dbt-Snowflake] <Passing user's Application name to Snowflake session> [ADAP-922] [dbt-Snowflake] <Passing user's Application name to Snowflake session> Sep 28, 2023
@dbeatty10 dbeatty10 changed the title [ADAP-922] [dbt-Snowflake] <Passing user's Application name to Snowflake session> [ADAP-922] [Feature] Passing user's Application name to Snowflake session Sep 28, 2023
@dbeatty10
Copy link
Contributor

What do you think @dataders ? The solution for dbt-databricks is in databricks/dbt-databricks#155. If we did something similar within dbt-snowflake, the relevant environment variable would be DBT_SNOWFLAKE_INVOCATION_ENV. Generalizing this approach to other adapters could either be an environment variable like DBT_{adapter}_INVOCATION_ENV or maybe a fully generalized name like DBT_USER_AGENT_ENTRY.

Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 28, 2023
Copy link
Contributor

github-actions bot commented Jan 4, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 4, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants