初始化Vertica作为气流的数据库后端时发生错误

时间:2019-04-15 16:06:59

标签: python airflow vertica

我正在尝试将airflow与Vertica数据库一起用作元数据的后端。

我已经正确配置了airflow.cfg文件,该文件提供了带有Vertica和架构名称的字符串连接。 这是我尝试运行airflow initdb

时遇到的错误
Traceback (most recent call last):
  File "/srv/python/virtualenvs/airflow/bin/airflow", line 32, in <module>
    args.func(args)
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/airflow/bin/                                                                                                                                                             cli.py", line 1096, in initdb
    db.initdb(settings.RBAC)
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/airflow/util                                                                                                                                                             s/db.py", line 91, in initdb
    upgradedb()
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/airflow/util                                                                                                                                                             s/db.py", line 358, in upgradedb
    command.upgrade(config, 'heads')
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/comm                                                                                                                                                             and.py", line 254, in upgrade
    script.run_env()
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/scri                                                                                                                                                             pt/base.py", line 427, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/util                                                                                                                                                             /pyfiles.py", line 81, in load_python_file
    module = load_module_py(module_id, path)
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/util                                                                                                                                                             /compat.py", line 83, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/airflow/migr                                                                                                                                                             ations/env.py", line 92, in <module>
    run_migrations_online()
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/airflow/migr                                                                                                                                                             ations/env.py", line 82, in run_migrations_online
    compare_type=COMPARE_TYPE,
  File "<string>", line 8, in configure
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/runt                                                                                                                                                             ime/environment.py", line 812, in configure
    opts=opts
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/runt                                                                                                                                                             ime/migration.py", line 172, in configure
    return MigrationContext(dialect, connection, opts, environment_context)
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/runt                                                                                                                                                             ime/migration.py", line 111, in __init__
    self.impl = ddl.DefaultImpl.get_by_dialect(dialect)(
  File "/srv/python/virtualenvs/airflow/lib/python3.6/site-packages/alembic/ddl/                                                                                                                                                             impl.py", line 65, in get_by_dialect
    return _impls[dialect.name]
KeyError: 'vertica'

这是专用virtualenv中安装的软件包的列表

alembic                   0.9.10
apache-airflow            1.10.3
Babel                     2.6.0
certifi                   2019.3.9
chardet                   3.0.4
Click                     7.0
colorama                  0.4.1
configparser              3.5.3
croniter                  0.3.29
cx-Oracle                 7.1.2
defusedxml                0.5.0
dill                      0.2.9
docutils                  0.14
Flask                     1.0.2
Flask-Admin               1.5.3
Flask-AppBuilder          1.12.3
Flask-Babel               0.12.2
Flask-Caching             1.3.3
Flask-Login               0.4.1
Flask-OpenID              1.2.5
Flask-SQLAlchemy          2.3.2
flask-swagger             0.2.13
Flask-WTF                 0.14.2
funcsigs                  1.0.0
future                    0.16.0
gitdb2                    2.0.5
GitPython                 2.1.11
gunicorn                  19.9.0
idna                      2.8
iso8601                   0.1.12
itsdangerous              1.1.0
Jinja2                    2.10
json-merge-patch          0.2
lockfile                  0.12.2
lxml                      4.3.3
Mako                      1.0.8
Markdown                  2.6.11
MarkupSafe                1.1.1
numpy                     1.16.2
ordereddict               1.1
pandas                    0.24.2
pendulum                  1.4.4
pip                       19.0.3
psutil                    5.6.1
psycopg2                  2.8.2
psycopg2-binary           2.8.2
Pygments                  2.3.1
python-daemon             2.1.2
python-dateutil           2.8.0
python-editor             1.0.4
python3-openid            3.1.0
pytz                      2019.1
pytzdata                  2019.1
PyYAML                    5.1
requests                  2.21.0
setproctitle              1.1.10
setuptools                41.0.0
six                       1.12.0
smmap2                    2.0.5
SQLAlchemy                1.2.18
sqlalchemy-vertica-python 0.4.4
tabulate                  0.8.3
tenacity                  4.12.0
text-unidecode            1.2
thrift                    0.11.0
tzlocal                   1.5.1
unicodecsv                0.14.1
urllib3                   1.24.1
vertica-python            0.9.1
Werkzeug                  0.14.1
wheel                     0.33.1
WTForms                   2.2.1
zope.deprecation          4.4.0

谢谢

0 个答案:

没有答案