catalog_workspace_content.

put_declarative_ldm

put_declarative_ldm(workspace_id: str, ldm: CatalogDeclarativeModel, validator: Optional[DataSourceValidator])

Puts a logical data model into a given workspace.

Optional validator checks that for every data_source_id in the logical data model there exists corresponding data source.

Parameters

nametypedescription
pathOptional[Path]Path to the root of the layout directory. Defaults to Path.cwd().
ldmCatalogDeclarativeModelObject Containing declarative Logical Data Model
validatorOptional[DataSourceValidator]Object that manages validation, whether each data_source_id in LDM corresponds to existing data source. Defaults to None.

Returns

None

Example

# Generate logical data model
logical_model = sdk.catalog_data_source.generate_logical_model(data_source_id="demo-test-ds")

# Do some changes
# ...

# Put logical data model
sdk.catalog_workspace_content.put_declarative_ldm(workspace_id="demo", ldm=logical_model)