CatalogWorkspaceService.

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 ) -> None

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

nametypedescription
source_workspace_idstrSource workspace ID, from which we wanna create a clone
target_workspace_idstrTarget workspace ID, where we wanna clone the source workspace Optional, if empty, we generate _clone
target_workspace_namestrTarget workspace name Optional, if empty, we generate (Clone)
overwrite_existingboolOverwrite existing workspace.
data_source_mappingdictOptional, allows users to map LDM to different data source ID
upper_caseboolOptional, 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_hierarchyboolPlace in the hierarchy of the source parent workspace.

Returns

None