mirror of
https://github.com/apache/superset.git
synced 2026-05-11 02:45:46 +00:00
Migrates Superset's example data system from Python-based scripts to YAML configuration files, providing a cleaner, more maintainable approach to managing example datasets, charts, and dashboards. - Converted 9 Python example modules to YAML configurations - Exported existing examples from database and added as YAML files: - 11 dashboards (USA Births Names, World Bank's Data, etc.) - 115 charts - 25 datasets - Moved test-specific fixtures to `tests/fixtures/examples/` - Removed theme_id from dashboard exports for compatibility - **New command group**: `superset examples` with subcommands: - `load` - Load example data (replaces `load-examples`) - `clear-old` - Remove old Python-based examples - `clear` - Placeholder for future YAML clearing - `reload` - Clear and reload in one command - **Backwards compatibility**: `superset load-examples` still works with deprecation warning - **Safety mechanism**: Detects old examples and preserves them to avoid data loss - Fixed JSON data loading - examples can now load `.json.gz` files from CDN - Fixed Docker compose configuration for isolated development - Fixed webpack WebSocket configuration for different ports - Import operations now log what's being created vs updated: - "Creating new dashboard: Sales Dashboard" - "Updating existing chart: World's Population" - Provides clear visibility into the import process - Moved import logging to individual import functions (DRY principle) - Non-destructive migration approach - no user data is deleted - Deterministic UUID generation for consistent example data - Tested migration from old Python examples to new YAML format - Verified safety mechanism prevents accidental data overwrites - Confirmed backwards compatibility with deprecated command - All pre-commit checks pass - Updated installation docs to use new CLI commands - Added deprecation notice to UPDATING.md - Updated development documentation None - the old `load-examples` command continues to work with a deprecation warning. For users with existing Python-based examples: 1. Run `superset examples clear-old --confirm` to remove old examples 2. Run `superset examples load` to load new YAML-based examples
70 lines
2.2 KiB
Bash
70 lines
2.2 KiB
Bash
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership.
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
# (the "License"); you may not use this file except in compliance with
|
|
# the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
# Allowing python to print() in docker
|
|
PYTHONUNBUFFERED=1
|
|
|
|
COMPOSE_PROJECT_NAME=superset
|
|
DEV_MODE=true
|
|
|
|
# database configurations (do not modify)
|
|
DATABASE_DB=superset
|
|
DATABASE_HOST=db
|
|
# Make sure you set this to a unique secure random value on production
|
|
DATABASE_PASSWORD=superset
|
|
DATABASE_USER=superset
|
|
|
|
EXAMPLES_DB=examples
|
|
EXAMPLES_HOST=db
|
|
EXAMPLES_USER=examples
|
|
# Make sure you set this to a unique secure random value on production
|
|
EXAMPLES_PASSWORD=examples
|
|
EXAMPLES_PORT=5432
|
|
|
|
# database engine specific environment variables
|
|
# change the below if you prefer another database engine
|
|
DATABASE_PORT=5432
|
|
DATABASE_DIALECT=postgresql
|
|
POSTGRES_DB=superset
|
|
POSTGRES_USER=superset
|
|
# Make sure you set this to a unique secure random value on production
|
|
POSTGRES_PASSWORD=superset
|
|
#MYSQL_DATABASE=superset
|
|
#MYSQL_USER=superset
|
|
#MYSQL_PASSWORD=superset
|
|
#MYSQL_RANDOM_ROOT_PASSWORD=yes
|
|
|
|
# Add the mapped in /app/pythonpath_docker which allows devs to override stuff
|
|
PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
|
|
REDIS_HOST=redis
|
|
REDIS_PORT=6379
|
|
|
|
FLASK_DEBUG=true
|
|
SUPERSET_APP_ROOT="/"
|
|
SUPERSET_ENV=development
|
|
SUPERSET_LOAD_EXAMPLES=yes
|
|
CYPRESS_CONFIG=false
|
|
SUPERSET_PORT=8088
|
|
MAPBOX_API_KEY=''
|
|
|
|
# Make sure you set this to a unique secure random value on production
|
|
SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET
|
|
ENABLE_PLAYWRIGHT=false
|
|
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
BUILD_SUPERSET_FRONTEND_IN_DOCKER=true
|
|
SUPERSET_LOG_LEVEL=info
|