This documentation is for the unstable version of GoodData, currrently in development.
For stable version, go to the latest stable version of this article.
For stable version, go to the latest stable version of this article.
catalog_workspace.
clone_workspace
clone_workspace(source_workspace_id: str, target_workspace_id: str, target_workspace_name: str, overwrite_existing: bool, data_source_mapping: dict, upper_case: bool, place_in_hierarchy: bool)
Clone workspace from existing workspace.
Clones complete workspace content - LDM, ADM, permissions.
If the target workspace already exists, it’s content is overwritten. This can be useful when testing changes in the clone
- once you are satisfied, you can clone it back to the origin workspace.
For the safety, you have to enforce this behavior by the dedicated input argument
overwrite_existing.
Beware of workspace data filters - after the clone you have to set WDF value for the new workspace.
Parameters
| name | type | description |
|---|---|---|
| source_workspace_id | str | Source workspace ID, from which we wanna create a clone |
| target_workspace_id | str | Target workspace ID, where we wanna clone the source workspace
Optional, if empty, we generate |
| target_workspace_name | str | Target workspace name
Optional, if empty, we generate |
| overwrite_existing | bool | Overwrite existing workspace. |
| data_source_mapping | dict | Optional, allows users to map LDM to different data source ID |
| upper_case | bool | Optional, allows users to change the case of all physical object IDs (table names, columns names) True changes it to upper-case, False to lower-case, None(default) is noop Useful when migrating to Snowflake, which is the only DB with upper-case default. |
| place_in_hierarchy | bool | Place in the hierarchy of the source parent workspace. |
Returns
NoneExample
# Clones complete workspace content - LDM, ADM, permissions.
sdk.catalog_workspace.clone_workspace(
source_workspace_id="123",
target_workspace_id="xyz",
target_workspace_name="Demo"
)