Airflow學習筆記

2021-12-30 11:46:26 字數 2994 閱讀 9912

airflow學習筆記---airflow安裝。首先安裝命令為:

pip install airflow

也可以:

pip install airflow[引數]

引數如下:

subpackage

install command

enables

allpipinstallairflow[all]

all airflow features known to man

all_dbs

pipinstallairflow[all_dbs]

all databases integrations

async

pipinstallairflow[async]

async worker classes for gunicorn

devel

pipinstallairflow[devel]

minimum dev tools requirements

devel_hadoop

pipinstallairflow[devel_hadoop]

airflow + dependencies on the hadoop stack

celery

pipinstallairflow[celery]

celeryexecutor

crypto

pipinstallairflow[crypto]

encrypt connection passwords in metadata db

druid

pipinstallairflow[druid]

druid.io related operators & hooks

gcp_api

pipinstallairflow[gcp_api]

google cloud platform hooks and operators (usinggoogle-api-python-client)

jdbc

pipinstallairflow[jdbc]

jdbc hooks and operators

hdfs

pipinstallairflow[hdfs]

hdfs hooks and operators

hive

pipinstallairflow[hive]

all hive related operators

kerberos

pipinstallairflow[kerberos]

kerberos integration for kerberized hadoop

ldap

pipinstallairflow[ldap]

ldap authentication for users

mssql

pipinstallairflow[mssql]

microsoft sql operators and hook, support as an airflow backend

mysql

pipinstallairflow[mysql]

mysql operators and hook, support as an airflow backend

password

pipinstallairflow[password]

password authentication for users

postgres

pipinstallairflow[postgres]

postgres operators and hook, support as an airflow backend

qdspipinstallairflow[qds]

enable qds (qubole data services) support

rabbitmq

pipinstallairflow[rabbitmq]

rabbitmq support as a celery backend

s3 pipinstallairflow[s3]

s3keysensor,s3prefixsensor

samba

pipinstallairflow[samba]

hive2sambaoperator

slack

pipinstallairflow[slack]

slackapipostoperator

vertica

pipinstallairflow[vertica]

vertica hook support as an airflow backend

cloudant

pipinstallairflow[cloudant]

cloudant hook

可以直接使用:

pip install airflow[all]

這樣就可以安裝所有依賴的東西,

配置環境變數:

export airflow_home=~/airflow

配置mysql資料庫儲存airflow資訊:

sql_alchemy_conn = mysql://user:password@ip:port/airflow

初始化資料庫:

airflow initdb

啟動web server,指定埠:

airflow webserver –p 18080

安裝成功介面:

後台顯示:

ok,在預設的配置下可以玩了,如果需要將airflow的資料儲存到資料庫的話,就可以配置一下儲存到資料庫。

Airflow學習之路一 概念

dag runs operators tasks task instances dag是乙個由n n 1 n geqslant1 n 1 個task構成的有向無環圖。它記錄了任務之間的邏輯關係,排程時間,任務狀態等等。以字典的形式將引數傳入dag中。官方文件1 中將引數統一放置於default ar...

Airflow安裝部署

新聞資訊是通過爬蟲獲取,使用scrapy框架進行爬蟲任務 使用airflow工作流監控平台對爬蟲任務進行管理 監控 可使用celeryexecutor分布式,也可使用localexecutor多程序進行資料採集 以下主要是對airflow的安裝和配置。目前使用的系統環境為centos linux r...

Airflow安裝部署

新聞資訊是通過爬蟲獲取,使用scrapy框架進行爬蟲任務 使用airflow工作流監控平台對爬蟲任務進行管理 監控 可使用celeryexecutor分布式,也可使用localexecutor多程序進行資料採集 以下主要是對airflow的安裝和配置。目前使用的系統環境為centos linux r...