35 строки
1.0 KiB
Python
35 строки
1.0 KiB
Python
'''
|
|
Imports operators dynamically while keeping the package API clean,
|
|
abstracting the underlying modules
|
|
'''
|
|
from airflow.utils import import_module_attrs as _import_module_attrs
|
|
|
|
_operators = {
|
|
'bash_operator': ['BashOperator'],
|
|
'python_operator': ['PythonOperator'],
|
|
'hive_operator': ['HiveOperator'],
|
|
'presto_check_operator': [
|
|
'PrestoCheckOperator',
|
|
'PrestoValueCheckOperator',
|
|
'PrestoIntervalCheckOperator',
|
|
],
|
|
'dummy_operator': ['DummyOperator'],
|
|
'email_operator': ['EmailOperator'],
|
|
'hive_to_samba_operator': ['Hive2SambaOperator'],
|
|
'mysql_operator': ['MySqlOperator'],
|
|
'mysql_to_hive': ['MySqlToHiveTransfer'],
|
|
'postgres_operator': ['PostgresOperator'],
|
|
'sensors': [
|
|
'SqlSensor',
|
|
'ExternalTaskSensor',
|
|
'HivePartitionSensor',
|
|
'S3KeySensor',
|
|
'S3PrefixSensor',
|
|
'HdfsSensor',
|
|
'TimeSensor',
|
|
],
|
|
'subdag_operator': ['SubDagOperator'],
|
|
}
|
|
|
|
_import_module_attrs(globals(), _operators)
|