配置 Apache Superset。如何配置apache超集?

问题描述 投票:0回答:1

以下详细信息在官方文档中提供了 Apache 超集的配置。但我无法清楚地理解这个过程。谁能详细解释一下如何配置 Apache 超集。另外,我还使用 Ubuntu 终端在我的 Windows PC 上安装了 Apache 超集。我在我的电脑中找不到超集存储库来检查 config.py 文件。使用 Ubuntu 终端安装 Apache superset 后,谁能解释一下如何配置它以及配置过程中应遵循的步骤。

链接:https://superset.apache.org/docs/installation/configuring-superset

配置超级集

配置

要配置您的应用程序,您需要创建一个文件 superset_config.py。将此文件添加到您的

PYTHONPATH 或创建环境变量 SUPERSET_CONFIG_PATH 指定 superset_config.py 的完整路径。

例如,如果直接在基于 Linux 的系统上部署 Superset,其中 superset_config.py 位于 /app 目录下,则可以运行:

export SUPERSET_CONFIG_PATH=/app/superset_config.py

如果您使用自己的自定义 Dockerfile,并以官方 Superset 镜像作为基础镜像,那么您可以添加您的覆盖,如下所示:

COPY --chown=superset superset_config.py /app/
ENV SUPERSET_CONFIG_PATH /app/superset_config.py

Docker 组合部署以不同的方式处理应用程序配置。有关详细信息,请参阅 https://github.com/apache/superset/tree/master/docker#readme

以下是您可以在 superset_config.py 文件中设置的一些参数的示例:

# Superset specific config
ROW_LIMIT = 5000

# Flask App Builder configuration
# Your App secret key will be used for securely signing the session cookie
# and encrypting sensitive information on the database
# Make sure you are changing this key for your deployment with a strong key.
# Alternatively you can set it with `SUPERSET_SECRET_KEY` environment variable.
# You MUST set this for production environments or the server will not refuse
# to start and you will see an error in the logs accordingly.
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'

# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
# The check_same_thread=false property ensures the sqlite client does not attempt
# to enforce single-threaded access, which may be problematic in some edge cases
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365

# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''

我已经尝试了所有的可能性,并在所有社区论坛中进行了搜索,但我找不到任何明确的 Apache superset 配置的解决方案。

visualization open-source apache-superset
1个回答
0
投票

如果您希望配置 Apache Superset,您需要使用名为“superset_config.py”的新文件覆盖配置,并且您需要将其放置在安装文件夹下,但这取决于您的安装,或者您可以使用以下命令指向它:

export SUPERSET_CONFIG_PATH=/path/to/superset_config.py
适用于 Linux 或者在窗口中使用
set SUPERSET_CONFIG_PATH=/app/superset_config.py
之后您可以在超集中配置您想要的内容。

© www.soinside.com 2019 - 2024. All rights reserved.