This documentation is for an older version of GoodData.
Go to the latest version of this article.
catalog_workspace_content.
load_and_put_declarative_analytics_model
load_and_put_declarative_analytics_model(workspace_id: str, layout_root_path: Path = Path.cwd())
This method combines load_declarative_analytics_model and put_declarative_analytics_model methods to load and set layouts stored using store_declarative_analytics_model.
Parameters
name | type | description |
---|---|---|
workspace_id | string | Workspace identification string e.g. "demo" |
layout_root_path | Optional[Path] | Path to the root of the layout directory. Defaults to Path.cwd(). |
Returns
None
Example
The load and put can be done two ways.
Either by one call:
# Load and put on server the stored layout
sdk.catalog_workspace_content.load_and_put_declarative_analytics_model(
workspace_id="123",
layout_root_path=Path.cwd()
)
Or by two separate calls:
# Get analytics layout
declarative_analytics = sdk.catalog_workspace_content.load_declarative_analytics_model(
workspace_id="123",
layout_root_path=Path.cwd()
)
# Put analytics model object back to the server:
sdk.catalog_workspace_content.put_declarative_analytics_model(
workspace_id="123",
analytics_model=declarative_analytics
)
The result is identical.