kaxil commented on a change in pull request #7923: Get Airflow Variables from 
Environment Variables
URL: https://github.com/apache/airflow/pull/7923#discussion_r399615781
 
 

 ##########
 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:
   This looks tough as we need Variable model here and we need to get the value 
in Variables.py file to keep it fully backward compatible

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to