catalog_workspace.
load_and_put_aac_workspace
load_and_put_aac_workspace(workspace_id: str, source_dir: Path)
Load AAC YAML files from source_dir, convert to declarative, and deploy to workspace.
Parameters
| name | type | description |
|---|---|---|
| workspace_id | str | Workspace identification string e.g. "demo" |
| source_dir | Path | Path to the directory containing AAC YAML files. |
Returns
NoneExample
Deploy AAC YAML files from a local directory to a workspace:
from pathlib import Path
from gooddata_sdk import GoodDataSdk
host = "https://www.example.com"
token = "some_user_token"
sdk = GoodDataSdk.create(host, token)
# Deploy AAC YAML files to workspace
sdk.catalog_workspace.load_and_put_aac_workspace(
workspace_id="demo",
source_dir=Path("analytics")
)The AAC YAML directory can contain typed subdirectories:
analytics/
datasets/
campaigns.yaml
orders.yaml
metrics/
revenue.yaml
visualisations/
revenue_chart.yaml
dashboards/
overview.yamlEach YAML file has a type field that determines its kind:
type: metric
id: revenue
title: Revenue
maql: SELECT SUM({fact/amount})
format: "#,##0"