This documentation is for an older version of GoodData.
Go to the latest version of this article.
catalog_workspace.
load_and_put_declarative_workspace
load_and_put_declarative_workspace(workspace_id: str, layout_root_path: Path = Path.cwd())
This method combines load_declarative_workspace and put_declarative_workspace methods to load and set layouts stored using store_declarative_workspace.
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.load_and_put_declarative_workspace(
workspace_id="demo",
layout_root_path=Path.cwd()
)
Or by two separate calls:
# Load a declarative workspace
declarative_workspaces = sdk.catalog_workspace.load_declarative_workspace(
workspace_id="demo",
layout_root_path=Path.cwd()
)
# Set the layout
sdk.catalog_workspace.put_declarative_workspace(
workspace_id="demo",
workspace=declarative_workspaces
)
The result is identical.