Multi-Asset Workflows
Multi-Asset Workflows
Section titled “Multi-Asset Workflows”Learn how to manage complex workflows involving multiple asset types with dependencies.
Understanding Dependencies
Section titled “Understanding Dependencies”Superset assets have a dependency hierarchy:
Databases ↓Datasets ↓Charts ↓DashboardsPulling Assets with Dependencies
Section titled “Pulling Assets with Dependencies”Pull Dashboard with Everything
Section titled “Pull Dashboard with Everything”# Pull dashboard with all dependenciessup dashboard pull --ids 123 --include-deps
# This pulls:# - Dashboard 123# - All charts in the dashboard# - All datasets used by charts# - Database connections (metadata only)Selective Dependency Pull
Section titled “Selective Dependency Pull”# Pull charts without datasetssup chart pull --ids 456,789 --no-deps
# Pull datasets without database configssup dataset pull --mine --skip-databasesMulti-Asset Sync Workflow
Section titled “Multi-Asset Sync Workflow”1. Create Sync Configuration
Section titled “1. Create Sync Configuration”source: workspace_id: 123 assets: dashboards: selection: ids ids: [100, 101] include_dependencies: true charts: selection: ids ids: [200, 201, 202] include_dependencies: true datasets: selection: all include_dependencies: false
targets: - workspace_id: 456 name: target-workspace2. Preview Changes
Section titled “2. Preview Changes”sup sync run multi-asset-sync.yml --dry-run3. Execute Sync
Section titled “3. Execute Sync”sup sync run multi-asset-sync.ymlHandling Conflicts
Section titled “Handling Conflicts”Dataset Name Conflicts
Section titled “Dataset Name Conflicts”When datasets have naming conflicts:
# Rename on pushsup dataset push --rename-pattern "DEV_{name}"
# Force overwritesup dataset push --force --overwriteChart Ownership
Section titled “Chart Ownership”Preserve or change ownership:
# Keep original ownersup chart push --preserve-owner
# Assign to current usersup chart push --assign-to-meBatch Operations
Section titled “Batch Operations”Export Everything
Section titled “Export Everything”# Export all assets from workspacesup workspace export --all --output ./backup/
# Export specific typessup workspace export --types charts,dashboards --output ./export/Import Bundle
Section titled “Import Bundle”# Import exported bundlesup workspace import ./backup/ --workspace-id 456Dependency Resolution
Section titled “Dependency Resolution”sup automatically resolves dependencies in the correct order:
- Databases are created/updated first
- Datasets are created with database references
- Charts are created with dataset references
- Dashboards are created with chart references
Best Practices
Section titled “Best Practices”- Always use —dry-run first to preview changes
- Version control your sync configurations
- Document dependencies in your sync config
- Use tags to organize related assets
- Test in staging before production sync
- Monitor logs for dependency warnings
Example: Full Migration
Section titled “Example: Full Migration”# 1. Export from sourcesup workspace use source-workspacesup workspace export --all --output ./migration/
# 2. Review exported assetsls -la ./migration/assets/
# 3. Import to targetsup workspace use target-workspacesup workspace import ./migration/ --force
# 4. Verify migrationsup dashboard list --limit 10sup chart list --limit 10