catalog_workspace_content.

load_and_put_declarative_ldm

load_and_put_declarative_ldm(workspace_id: str, layout_root_path: Path, validator: Optional[DataSourceValidator], standalone_copy: bool)

This method combines load_declarative_ldm and put_declarative_ldm methods to load and set layouts stored using store_declarative_ldm.

Parameters

nametypedescription
workspace_idstrWorkspace identification string e.g. "demo"
layout_root_pathPathPath to the root of the layout directory. Defaults to Path.cwd().
validatorOptional[DataSourceValidator]Object that manages validation, whether each data_source_id in LDM corresponds to existing data source. Defaults to None.
standalone_copyboolIf true, then workspace data filter references will be removed from LDM. Note that first, the copy is made so we do not interfere with the original input.

Returns

None

Example

The load and put can be done two ways.

Either by one call:

# Load and  put logical data model.
sdk.catalog_workspace_content.load_and_put_declarative_ldm(
    workspace_id="123",
    layout_root_path=Path.cwd()
)

Or by two separate calls:

# Load stored declarative Logical Data Model
logical_model = sdk.catalog_workspace_content.load_declarative_ldm(
    workspace_id="123",
    layout_root_path=Path.cwd()
)
# Put logical data model
sdk.catalog_workspace_content.put_declarative_ldm(
    workspace_id="123",
    ldm=logical_model
)

The result is identical.