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.
Workspace Contents
Workspace content includes all:
- Facts
- Attributes
- Labels
- Metrics
- Visualizations
- Dashboards
Within a multitenant workspace hierarchy, the analytical model of a parent workspace is shared with child workspaces.
Entity methods
- get_full_catalog
- get_visualization
- get_visualizations
- get_metrics_catalog
- get_facts_catalog
- get_attributes_catalog
- get_labels_catalog
Entity graph methods
Table methods
Example
Connect to a workspace and create lists of all datesets, metrics, attributes and facts the workspace contains:
from gooddata_sdk import GoodDataSdk
# GoodData base URL, e.g. "https://www.example.com"
host = "https://www.example.com"
# GoodData user token
token = "some_user_token"
sdk = GoodDataSdk.create(host, token)
workspace_id = "123"
# Read catalog for demo workspace
catalog = sdk.catalog_workspace_content.get_full_catalog(workspace_id)
# Print all dataset in the workspace
for dataset in catalog.datasets:
print(str(dataset))
# Print all metrics in the workspace
for metric in catalog.metrics:
print(str(metric))
# Read list of attributes for demo workspace
attributes = sdk.catalog_workspace_content.get_attributes_catalog(workspace_id)
# Read list of facts for demo workspace
facts = sdk.catalog_workspace_content.get_facts_catalog(workspace_id)