- 1 year ago
airflow db init doesn't create an expected "airflow" directory on windows
When running airflow db init
on Windows, the command does not create an "airflow" directory by default. Instead, it initializes the necessary database tables and configurations for Apache Airflow.
The airflow db init
command performs the following actions:
- It initializes the metadata database tables required by Airflow, such as connections, variables, task instances, etc.
- It creates the
airflow.cfg
file in the Airflow home directory (by default,C:\Users\<username>\airflow
on Windows). - It generates a default SQLite database file (
airflow.db
) in the Airflow home directory.
Therefore, you should expect to find the airflow.cfg
file and the airflow.db
database file in the Airflow home directory after running airflow db init
, but not an "airflow" directory itself.
To confirm the successful initialization of the database, you can navigate to the Airflow home directory (C:\Users\<username>\airflow
) and verify the presence of the airflow.cfg
and airflow.db
files. These files indicate that the database has been initialized and can be used with Apache Airflow.
Remember to adjust the Airflow home directory if you have customized it during the installation or configuration process.