This documentation is for an older version of GoodData.
Go to the latest version of this article.
catalog_workspace_content.
store_analytics_model_to_disk
store_analytics_model_to_disk(workspace_id: str, path: Path = Path.cwd(), exclude: Optional[list[str]] = None, sort: bool = False)
Stores analytics model for a given workspace in directory hierarchy.This method does not tie the declarative analytics model to the workspace and organization, thus it is recommended for migration between workspaces. If you want to backup analytics model between workspaces or organizations, use store_analytics_model_to_disk.
The directory structure below shows the output for the path set to Path("analytics_model_location")
.
analytics_model_location
└── analytics_model
├── analytical_dashboards
│ └── analytical_dashboard.yaml
├── dashboard_plugins
│ └── dashboard_plugin.yaml
├── filter_contexts
│ └── filter_context.yaml
├── metrics
│ └── metric.yaml
└── visualization_objects
└── visualization_object.yaml
Parameters
name | type | description |
---|---|---|
workspace_id | str | Workspace identification string e.g. "demo" |
path | Optional[Path] | Path to the root of the layout directory. Defaults to Path.cwd(). |
exclude | Optional[list[str]] | Defines properties which should not be included in the result. E.g.: ["ACTIVITY_INFO"] – refers to createdBy, etc. Default is None. |
sort | bool | Flag if the output should be sorted before storing to disk. Default is False. |
Returns
None
Example
# Store the analytics model to disk
sdk.catalog_workspace_content.store_analytics_model_to_disk(
workspace_id="123",
path=Path.cwd()
)