Superset执行「superset db upgrade」命令的报错记录
【摘要】 Superset执行「superset db upgrade」命令的报错记录
Superset执行「superset db upgrade」命令的报错记录
零、写在前面
- 背景:离线数仓4.0项目可视化报表模块
- 实验环境:Python3.7 | CentOS7.5
一、「superset db upgrade」报错记录
0. 按照尚硅谷视频操作,执行到「superset db upgrade」出现以下错误
报错1
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module>
from superset.cli.main import superset
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/__init__.py", line 21, in <module>
from superset.app import create_app
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/app.py", line 23, in <module>
from superset.initialization import SupersetAppInitializer
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/initialization/__init__.py", line 51, in <module>
from superset.security import SupersetSecurityManager
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/__init__.py", line 17, in <module>
from superset.security.manager import SupersetSecurityManager # noqa: F401
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/manager.py", line 68, in <module>
from superset.security.guest_token import (
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/security/guest_token.py", line 18, in <module>
from typing import List, Optional, TypedDict, Union
ImportError: cannot import name 'TypedDict' from 'typing' (/opt/module/miniconda3/envs/superset/lib/python3.7/typing.py)
ImportError: cannot import name ‘TypedDict’ from ‘typing’ (/opt/module/miniconda3/envs/superset/lib/python3.7/typing.py)
关于TypedDict
的这个error,其实是Python版本的问题
这里需要将更换为Python3.9
注意
「Python3.8似乎不可以」
解决方法
- 0.卸载之前安装好的Superset
-- 退出当前环境
(superset) [root@node01 ~]$ conda deactivate
-- 卸载Superset
conda remove -n superset --all
-- 查看是否卸载成功「没有superset环境即成功」
conda info --envs
- 1.重装Python3.9环境
conda create --name superset python=3.9
- 2.激活superset环境
[root@node01 ~]$ conda activate superset
- 3.查看Anaconda下的Python版本
(superset) [root@node01 ~]$ python
=============== Result ===================
Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
- 4.安装Superset所需依赖
(superset) [root@node01 ~]$ sudo yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel python-setuptools openssl-devel cyrus-sasl-devel openldap-devel
- 5.安装(更新)setuptools和pip
(superset) [root@node01 ~]$ pip install --upgrade setuptools pip -i https://pypi.douban.com/simple/
- 6.安装Superset
(superset) [root@node01 ~]$ pip install apache-superset -i https://pypi.douban.com/simple/
-
- 初始化Supetset数据库
(superset) [root@node01 ~]$ superset db upgrade
接着错误又来了
二、报错2解决方案「Python3.7和3.9均有这个error」
报错2
(superset) [root@node01 ~]$ superset db upgrade
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/bin/superset", line 5, in <module>
from superset.cli.main import superset
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/superset/__init__.py", line 18, in <module>
from flask import current_app, Flask
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/flask/__init__.py", line 14, in <module>
from jinja2 import escape
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/__init__.py", line 12, in <module>
from .environment import Environment
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/environment.py", line 25, in <module>
from .defaults import BLOCK_END_STRING
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/defaults.py", line 3, in <module>
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/jinja2/filters.py", line 13, in <module>
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/markupsafe/__init__.py)
ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’ (/opt/module/miniconda3/envs/superset/lib/python3.7/site-packages/markupsafe/init.py)
报错原因
'soft_unicode' from 'markupsafe'
:这个错误涉及到markupsafe的版本,需要退回到2.0.1
解决方法
(superset) [root@node01 ~]$ pip uninstall markupsafe;python -m pip install markupsafe==2.0.1;
三、报错3解决方案
报错3
Usage: superset [OPTIONS] COMMAND [ARGS]...
Try 'superset --help' for help.
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.
报错原因
这是由于一开始创建的superset不是管理员用户,执行以下命令即可
解决方法
(superset) [root@node01 ~]$ export FLASK_APP=superset
四、报错4解决方案
报错4
--------------------------------------------------------------------------------
WARNING
--------------------------------------------------------------------------------
A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
logging was configured successfully
2022-09-12 06:56:01,130:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-09-12 06:56:01,135:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-09-12 06:56:01,137:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-09-12 06:56:01,140:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Failed to create app
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
2022-09-12 06:56:01,246:ERROR:superset.app:Failed to create app
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/bin/superset", line 8, in <module>
sys.exit(superset())
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/core.py", line 1654, in invoke
super().invoke(ctx)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/flask/cli.py", line 354, in decorator
app = __ctx.ensure_object(ScriptInfo).load_app()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/flask/cli.py", line 308, in load_app
app = locate_app(import_name, name)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/flask/cli.py", line 235, in locate_app
return find_best_app(module)
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/flask/cli.py", line 63, in find_best_app
app = app_factory()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 44, in create_app
raise ex
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
报错原因
依旧是版本问题:
werkzeug
版本需要从2.2.2降到2.0.1
解决方法
(superset) [root@node01 ~]$ pip uninstalll werkzeyg;pip install werkzeug==2.0.1;
五、若如依旧不成功
请将Superset的版本降为1.4.2
(superset) [root@node01 ~]$ pip install apache-superset==1.4.2
六、最后
再次执行「superset db upgrade」命令
看到大量「info」且没有Error即部署成功Superset
成功信息如下
(superset) [root@node01 ~]$ superset db upgrade
--------------------------------------------------------------------------------
WARNING
--------------------------------------------------------------------------------
A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
logging was configured successfully
2022-09-12 07:09:59,711:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-09-12 07:09:59,716:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/flask_caching/__init__.py:119: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
No PIL installation found
2022-09-12 07:09:59,970:INFO:superset.utils.screenshots:No PIL installation found
WARNI [alembic.env] SQLite Database support for metadata databases will be removed in a future version of Superset.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 4e6a06bad7a8, Init
INFO [alembic.runtime.migration] Running upgrade 4e6a06bad7a8 -> 5a7bad26f2a7, empty message
INFO [alembic.runtime.migration] Running upgrade 5a7bad26f2a7 -> 1e2841a4128, empty message
INFO [alembic.runtime.migration] Running upgrade 1e2841a4128 -> 2929af7925ed, TZ offsets in data sources
INFO [alembic.runtime.migration] Running upgrade 2929af7925ed -> 289ce07647b, Add encrypted password field
INFO [alembic.runtime.migration] Running upgrade 289ce07647b -> 1a48a5411020, adding slug to dash
INFO [alembic.runtime.migration] Running upgrade 1a48a5411020 -> 315b3f4da9b0, adding log model
INFO [alembic.runtime.migration] Running upgrade 315b3f4da9b0 -> 55179c7f25c7, sqla_descr
INFO [alembic.runtime.migration] Running upgrade 55179c7f25c7 -> 12d55656cbca, is_featured
/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/alembic/ddl/sqlite.py:81: UserWarning: Skipping unsupported ALTER for creation of implicit constraint. Please refer to the batch mode feature which allows for SQLite migrations using a copy-and-move strategy.
util.warn(
INFO [alembic.runtime.migration] Running upgrade 12d55656cbca -> 2591d77e9831, user_id
INFO [alembic.runtime.migration] Running upgrade 2591d77e9831 -> 8e80a26a31db, empty message
INFO [alembic.runtime.migration] Running upgrade 8e80a26a31db -> 7dbf98566af7, empty message
INFO [alembic.runtime.migration] Running upgrade 7dbf98566af7 -> 43df8de3a5f4, empty message
INFO [alembic.runtime.migration] Running upgrade 43df8de3a5f4 -> d827694c7555, css templates
INFO [alembic.runtime.migration] Running upgrade d827694c7555 -> 430039611635, log more
INFO [alembic.runtime.migration] Running upgrade 430039611635 -> 18e88e1cc004, making audit nullable
INFO [alembic.runtime.migration] Running upgrade 18e88e1cc004 -> 836c0bf75904, cache_timeouts
INFO [alembic.runtime.migration] Running upgrade 18e88e1cc004 -> a2d606a761d9, adding favstar model
INFO [alembic.runtime.migration] Running upgrade a2d606a761d9, 836c0bf75904 -> d2424a248d63, empty message
INFO [alembic.runtime.migration] Running upgrade d2424a248d63 -> 763d4b211ec9, fixing audit fk
INFO [alembic.runtime.migration] Running upgrade d2424a248d63 -> 1d2ddd543133, log dt
INFO [alembic.runtime.migration] Running upgrade 1d2ddd543133, 763d4b211ec9 -> fee7b758c130, empty message
INFO [alembic.runtime.migration] Running upgrade fee7b758c130 -> 867bf4f117f9, Adding extra field to Database model
INFO [alembic.runtime.migration] Running upgrade 867bf4f117f9 -> bb51420eaf83, add schema to table model
INFO [alembic.runtime.migration] Running upgrade bb51420eaf83 -> b4456560d4f3, change_table_unique_constraint
INFO [alembic.runtime.migration] Running upgrade b4456560d4f3 -> 4fa88fe24e94, owners_many_to_many
INFO [alembic.runtime.migration] Running upgrade 4fa88fe24e94 -> c3a8f8611885, Materializing permission
INFO [alembic.runtime.migration] Running upgrade c3a8f8611885 -> f0fbf6129e13, Adding verbose_name to tablecolumn
INFO [alembic.runtime.migration] Running upgrade f0fbf6129e13 -> 956a063c52b3, adjusting key length
INFO [alembic.runtime.migration] Running upgrade 956a063c52b3 -> 1226819ee0e3, Fix wrong constraint on table columns
INFO [alembic.runtime.migration] Running upgrade 1226819ee0e3 -> d8bc074f7aad, Add new field 'is_restricted' to SqlMetric and DruidMetric
INFO [alembic.runtime.migration] Running upgrade d8bc074f7aad -> 27ae655e4247, Make creator owners
INFO [alembic.runtime.migration] Running upgrade 27ae655e4247 -> 960c69cb1f5b, add dttm_format related fields in table_columns
INFO [alembic.runtime.migration] Running upgrade 960c69cb1f5b -> f162a1dea4c4, d3format_by_metric
INFO [alembic.runtime.migration] Running upgrade f162a1dea4c4 -> ad82a75afd82, Update models to support storing the queries.
INFO [alembic.runtime.migration] Running upgrade ad82a75afd82 -> 3c3ffe173e4f, add_sql_string_to_table
INFO [alembic.runtime.migration] Running upgrade 3c3ffe173e4f -> 41f6a59a61f2, database options for sql lab
INFO [alembic.runtime.migration] Running upgrade 41f6a59a61f2 -> 4500485bde7d, allow_run_sync_async
INFO [alembic.runtime.migration] Running upgrade 4500485bde7d -> 65903709c321, allow_dml
INFO [alembic.runtime.migration] Running upgrade 41f6a59a61f2 -> 33d996bcc382, update slice model
INFO [alembic.runtime.migration] Running upgrade 33d996bcc382, 65903709c321 -> b347b202819b, empty message
INFO [alembic.runtime.migration] Running upgrade b347b202819b -> 5e4a03ef0bf0, Add access_request table to manage requests to access datastores.
INFO [alembic.runtime.migration] Running upgrade 5e4a03ef0bf0 -> eca4694defa7, sqllab_setting_defaults
INFO [alembic.runtime.migration] Running upgrade eca4694defa7 -> ab3d66c4246e, add_cache_timeout_to_druid_cluster
INFO [alembic.runtime.migration] Running upgrade eca4694defa7 -> 3b626e2a6783, Sync DB with the models.py.
WARNI [root] Constraint must have a name
INFO [alembic.runtime.migration] Running upgrade 3b626e2a6783, ab3d66c4246e -> ef8843b41dac, empty message
INFO [alembic.runtime.migration] Running upgrade ef8843b41dac -> b46fa1b0b39e, Add json_metadata to the tables table.
INFO [alembic.runtime.migration] Running upgrade b46fa1b0b39e -> 7e3ddad2a00b, results_key to query
INFO [alembic.runtime.migration] Running upgrade 7e3ddad2a00b -> ad4d656d92bc, Add avg() to default metrics
INFO [alembic.runtime.migration] Running upgrade ad4d656d92bc -> c611f2b591b8, dim_spec
INFO [alembic.runtime.migration] Running upgrade c611f2b591b8 -> e46f2d27a08e, materialize perms
INFO [alembic.runtime.migration] Running upgrade e46f2d27a08e -> f1f2d4af5b90, Enable Filter Select
INFO [alembic.runtime.migration] Running upgrade e46f2d27a08e -> 525c854f0005, log_this_plus
INFO [alembic.runtime.migration] Running upgrade 525c854f0005, f1f2d4af5b90 -> 6414e83d82b7, empty message
INFO [alembic.runtime.migration] Running upgrade 6414e83d82b7 -> 1296d28ec131, Adds params to the datasource (druid) table
INFO [alembic.runtime.migration] Running upgrade 1296d28ec131 -> f18570e03440, Add index on the result key to the query table.
INFO [alembic.runtime.migration] Running upgrade f18570e03440 -> bcf3126872fc, Add keyvalue table
INFO [alembic.runtime.migration] Running upgrade f18570e03440 -> db0c65b146bd, update_slice_model_json
INFO [alembic.runtime.migration] Running upgrade db0c65b146bd -> a99f2f7c195a, rewriting url from shortner with new format
INFO [alembic.runtime.migration] Running upgrade a99f2f7c195a, bcf3126872fc -> d6db5a5cdb5d, empty message
INFO [alembic.runtime.migration] Running upgrade d6db5a5cdb5d -> b318dfe5fb6c, adding verbose_name to druid column
INFO [alembic.runtime.migration] Running upgrade d6db5a5cdb5d -> 732f1c06bcbf, add fetch values predicate
INFO [alembic.runtime.migration] Running upgrade 732f1c06bcbf, b318dfe5fb6c -> ea033256294a, empty message
INFO [alembic.runtime.migration] Running upgrade b318dfe5fb6c -> db527d8c4c78, Add verbose name to DruidCluster and Database
INFO [alembic.runtime.migration] Running upgrade db527d8c4c78, ea033256294a -> 979c03af3341, empty message
INFO [alembic.runtime.migration] Running upgrade 979c03af3341 -> a6c18f869a4e, query.start_running_time
INFO [alembic.runtime.migration] Running upgrade a6c18f869a4e -> 2fcdcb35e487, saved_queries
INFO [alembic.runtime.migration] Running upgrade 2fcdcb35e487 -> a65458420354, add_result_backend_time_logging
INFO [alembic.runtime.migration] Running upgrade a65458420354 -> ca69c70ec99b, tracking_url
INFO [alembic.runtime.migration] Running upgrade ca69c70ec99b -> a9c47e2c1547, add impersonate_user to dbs
INFO [alembic.runtime.migration] Running upgrade ca69c70ec99b -> ddd6ebdd853b, annotations
INFO [alembic.runtime.migration] Running upgrade a9c47e2c1547, ddd6ebdd853b -> d39b1e37131d, empty message
INFO [alembic.runtime.migration] Running upgrade ca69c70ec99b -> 19a814813610, Adding metric warning_text
INFO [alembic.runtime.migration] Running upgrade 19a814813610, a9c47e2c1547 -> 472d2f73dfd4, empty message
INFO [alembic.runtime.migration] Running upgrade 472d2f73dfd4, d39b1e37131d -> f959a6652acd, empty message
INFO [alembic.runtime.migration] Running upgrade f959a6652acd -> 4736ec66ce19, empty message
/opt/module/miniconda3/envs/superset/lib/python3.9/site-packages/sqlalchemy/dialects/sqlite/base.py:2011: SAWarning: WARNING: SQL-parsed foreign key constraint '('datasource_name', 'datasources', 'datasource_name')' could not be located in PRAGMA foreign_keys for table metrics
util.warn(
...........
七、参考资料
https://blog.csdn.net/qq1787546870/article/details/124582727
https://blog.csdn.net/WangQueBuShiLei/article/details/125926941
顺利解决
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)