I am trying to update the airflow variable within a python operator. Outside the operator, I can update, but within operator, getting some error
Variable.update('inv_test_var', '2023-06-28 04:12:00') # it works
def py_function():
print("**************************************************")
#new_var = Variable.get('inv_test_var')
Variable.update('inv_test_var','2023-06-28 04:20:00') # not worked
print("**************************************************")
within a dag, I have called this function py_function
ERROR - Google Cloud API Call Error (NotFound): Secret ID inv_test_var not found.
Not sure, why in operator, its not getting updated. Can anyone please let me know?