Cross-Workspace Sync
Cross-Workspace Sync
Section titled “Cross-Workspace Sync”Cross-workspace sync allows you to move assets between different Superset or Preset workspaces, perfect for development-to-production workflows.
Basic Workflow
Section titled “Basic Workflow”1. Set Source and Target Workspaces
Section titled “1. Set Source and Target Workspaces”# Set source workspacesup workspace use 123
# Set target workspacesup workspace set-target 4562. Pull from Source
Section titled “2. Pull from Source”# Pull specific dashboardssup dashboard pull --ids 789,790
# Pull charts with dependenciessup chart pull --mine --include-deps3. Push to Target
Section titled “3. Push to Target”# Push to target workspacesup dashboard push --workspace-id 456 --forceAdvanced Sync Configuration
Section titled “Advanced Sync Configuration”Multi-Target Sync
Section titled “Multi-Target Sync”Create a sync configuration for multiple targets:
source: workspace_id: 123 assets: dashboards: selection: ids ids: [789, 790] charts: selection: all
targets: - workspace_id: 456 name: staging - workspace_id: 789 name: productionRun the sync:
sup sync run ./sync_config.ymlBest Practices
Section titled “Best Practices”- Always pull before push to ensure you have the latest version
- Use —dry-run to preview changes before applying
- Version control your sync configs for reproducibility
- Test in staging before pushing to production
Common Issues
Section titled “Common Issues”Dependency Conflicts
Section titled “Dependency Conflicts”When pushing assets with dependencies:
- Datasets must exist before charts
- Databases must exist before datasets
- Use
--include-depsto automatically handle dependencies
Permission Errors
Section titled “Permission Errors”Ensure your API credentials have:
- Read access to source workspace
- Write access to target workspace
- Admin permissions for database connections