This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 643e46c  Added ability for Snowflake to attribute usage to Airflow by 
adding an application parameter (#16420)
643e46c is described below

commit 643e46ca7ad0b86ddcdae37ffe5b77d31c46b52f
Author: sfc-gh-madkins <[email protected]>
AuthorDate: Tue Jun 15 03:14:09 2021 -0500

    Added ability for Snowflake to attribute usage to Airflow by adding an 
application parameter (#16420)
---
 airflow/providers/snowflake/hooks/snowflake.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow/providers/snowflake/hooks/snowflake.py 
b/airflow/providers/snowflake/hooks/snowflake.py
index f9d2d0d..6febfcc 100644
--- a/airflow/providers/snowflake/hooks/snowflake.py
+++ b/airflow/providers/snowflake/hooks/snowflake.py
@@ -179,6 +179,8 @@ class SnowflakeHook(DbApiHook):
             "role": self.role or role,
             "authenticator": self.authenticator or authenticator,
             "session_parameters": self.session_parameters or 
session_parameters,
+            # application is used to track origin of the requests
+            "application": os.environ.get("AIRFLOW_SNOWFLAKE_PARTNER", 
"AIRFLOW")
         }
 
         # If private_key_file is specified in the extra json, load the 
contents of the file as a private

Reply via email to