Workspace Objects Organization

The way objects are organized in visualization components depends on the component itself. However, the platform takes a general approach based on tags. Each object can have multiple tags, and each tag acts like a folder in which the object is placed.

Components That Use Tags

Analytical Designer

In the Analytical Designer, tags organize the catalog and are applied to datasets, attributes, facts, and metrics.

Attributes and labels from date datasets are always placed in their own folder.

Embedded Analytical Designer and KPI Dashboard

When using these components in an embedded format, you can use tags to limit which entities are available.

Setting Tags

Tags can be set for analytical layer objects (like metrics) via the entity or declarative API. However, tags for logical model objects (like datasets, attributes, facts, and labels) can only be set via the declarative API. A tag is just a regular string.

Examples

Example of setting tags using the entity API:

{
  "data": {
    "attributes": {
      "content": {
        "maql": "..."
      },
      "title": "Revenue",
      "tags": [
        "Revenue metrics"
      ]
    },
    "id": "revenue",
    "type": "metric"
  }
}

Example of setting tags using the declarative API:

  • Dataset and Related Objects:
{
  "id": "campaigns",
  "title": "Campaigns",
  "description": "Campaigns",
  "grain": [
    {
      "id": "campaigns.campaign_id",
      "type": "attribute"
    }
  ],
  "attributes": [
    {
      "id": "campaigns.campaign_name",
      "title": "Campaign name",
      "description": "Campaign name",
      "labels": [
        {
          "id": "campaigns.campaign_name",
          "title": "Campaign name",
          "description": "Campaign name",
          "primary": true,
          "sourceColumn": "campaign_name",
          "sourceColumnDataType": "STRING",
          "tags": [
            "Campaigns"
          ]
        }
      ],
      "tags": [
        "Campaigns"
      ]
    },
    {
      "id": "campaigns.campaign_id",
      "title": "Campaign id",
      "description": "Campaign id",
      "labels": [
        {
          "id": "campaigns.campaign_id",
          "title": "Campaign id",
          "description": "Campaign id",
          "primary": true,
          "sourceColumn": "campaign_id",
          "sourceColumnDataType": "STRING",
          "tags": [
            "Campaigns"
          ]
        }
      ],
      "tags": [
        "Campaigns"
      ]
    }
  ],
  "facts": [],
  "references": [],
  "dataSourceTableId": {
    "id": "campaigns",
    "path": ["demo_3920fbd8f33ec386", "campaign_channels"],
    "dataSourceId": "pg_local_docker-demo",
    "type": "dataSource"
  },
  "tags": [
    "Campaigns"
  ]
}
  • Date Instance:
{
  "id": "date",
  "title": "Date",
  "description": "",
  "granularitiesFormatting": {
    "titleBase": "",
    "titlePattern": "%titleBase - %granularityTitle"
  },
  "granularities": [
    "QUARTER",
    "DAY",
    "WEEK",
    "MONTH",
    "YEAR"
  ],
  "tags": [
    "Common date"
  ]
}