kaxil commented on a change in pull request #7923: [WIP] Get Airflow Connection 
from Environment Variables & SecretsBackend
URL: https://github.com/apache/airflow/pull/7923#discussion_r399585371
 
 

 ##########
 File path: airflow/secrets/metastore.py
 ##########
 @@ -37,3 +37,16 @@ def get_connections(self, conn_id, session=None) -> 
List[Connection]:
         conn_list = session.query(Connection).filter(Connection.conn_id == 
conn_id).all()
         session.expunge_all()
         return conn_list
+
+    @provide_session
+    def get_variable(self, key: str, session=None):
+        """
+        Get Airflow Variable from Metadata DB
+
+        :param key: Variable Key
+        :return: Variable Value
+        """
+        from airflow.models.variable import Variable
 
 Review comment:
   Yup, I will try to get rid of it as soon as I have the final draft ready :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to