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_content.
get_declarative_ldm
get_declarative_ldm(workspace_id: str) -> CatalogDeclarativeModel
Retrieve a logical model layout. On CatalogDeclarativeModel user can call ``modify_mapped_data_source(data_source_mapping: dict)`` method, which substitutes data source id in datasets.
Parameters
| name | type | description |
|---|---|---|
| workspace_id | str | Workspace identification string e.g. "demo" |
Returns
| type | description |
|---|---|
| CatalogDeclarativeModel | Object Containing declarative Logical Data Model. |
Example
# Get declarative Logical Data Model
declarative_ldm = sdk.catalog_workspace_content.get_declarative_ldm(workspace_id="123")
# CatalogDeclarativeModel(
# ldm=CatalogDeclarativeLdm(
# datasets=[
# CatalogDeclarativeDataset(
# id='campaign_channels',
# title='Campaign channels',
# grain=[
# CatalogGrainIdentifier(
# id='campaign_channel_id',
# type='attribute'
# )
# ],
# references=[
# CatalogDeclarativeReference(
# identifier=CatalogReferenceIdentifier(
# id='campaigns'
# ),
# multivalue=False,
# source_columns=['campaign_id']
# )
# ],
# description='Campaign channels',
# attributes=[
# CatalogDeclarativeAttribute(
# id='campaign_channel_id',
# title='Campaign channel id',
# source_column='campaign_channel_id',
# labels=[],
# ...