Created
December 9, 2019 10:11
-
-
Save jagamts1/3b062190a3872e85ed20ea9e44e5bca1 to your computer and use it in GitHub Desktop.
Airflow releated commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run webserver | |
airflow webserver -p 8080 | |
# To run airflow scheduler | |
airflow scheduler | |
# To initiate database | |
airflow initdb | |
# To reset db | |
airflow resetdb | |
# To check code working fine or not | |
python dags/file.py | |
# To List all of the dags | |
airflow list_dags | |
# To List all of dags tasks | |
airflow list_tasks dag_name --tree | |
# To test task | |
airflow test dag_name task_name 2019-10-10 | |
# To back fill data for dags | |
airflow backfill dag_name -s 2019-10-10 -e 2019-10-12 | |
# To connect to the postgres database | |
sudo -u postgres psql | |
# To set postgre database connection to sqlalchemy | |
sql_alchemy_conn = postgresql://airflow:nineleaps@localhost:5432/airflowtesting1 | |
#To create airflow user and give read and write permission to the created user.. | |
CREATE USER user_name WITH PASSWORD 'user_password'; | |
GRANT ALL PRIVILEGES ON DATABASE "user_database" to tester; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment