The `delete` method in the `Variable` class of the `airflow.models` package is used to delete a specific Variable object from the Airflow database. This can be especially useful if a Variable is no longer needed and is taking up unnecessary space in the database.
Example 1: The following code deletes a Variable with the key "my_variable":
from airflow.models import Variable
Variable.delete(key='my_variable')
Example 2: The following code deletes all Variables in the database:
from airflow.models import Variable
Variable.delete()
Package library: `airflow.models`
Python Variable.delete - 22 examples found. These are the top rated real world Python examples of airflow.models.Variable.delete extracted from open source projects. You can rate examples to help us improve the quality of examples.