From d8198f97c94feb0c8f7392907fea58c6451179c0 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Tue, 15 Oct 2024 13:37:49 +0200 Subject: [PATCH 1/4] docs: fix type in data sources JIRA: TRIVIAL risk: low --- docs/content/en/latest/data/data-source/list_data_sources.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/content/en/latest/data/data-source/list_data_sources.md b/docs/content/en/latest/data/data-source/list_data_sources.md index d3b7455d1..6167cb4ae 100644 --- a/docs/content/en/latest/data/data-source/list_data_sources.md +++ b/docs/content/en/latest/data/data-source/list_data_sources.md @@ -35,7 +35,6 @@ data_sources = sdk.catalog_data_source.list_data_sources() # type='POSTGRESQL', # schema='demo', # url='jdbc:postgresql://localhost:5432/demo', -# enable_caching=False, # cache_path=None, # parameters=None, # decoded_parameters=None, From c23e0cb5f21884895ff43d1d8db4f6cb6dce230c Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Tue, 15 Oct 2024 13:39:27 +0200 Subject: [PATCH 2/4] feat: improve resolving oneOf relationships There was an issue resolving oneOf. A workaround was introduced some time ago, but it did not work for ExportDefinitionRequest. ExportDefinitionRequest was correctly matched, but it did not pass the assert, so it failed with the error that none oneOf could be used. Therefore, assert was extended for the use case when all model_kwargs are presented in oneof_class.openapi_types. This new condition and the old one should cover both cases. JIRA: PSDK-209 risk: low --- .openapi-generator/custom_templates/model_utils.mustache | 2 +- gooddata-api-client/gooddata_api_client/model_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.openapi-generator/custom_templates/model_utils.mustache b/.openapi-generator/custom_templates/model_utils.mustache index dc47c138a..84c13035b 100644 --- a/.openapi-generator/custom_templates/model_utils.mustache +++ b/.openapi-generator/custom_templates/model_utils.mustache @@ -1547,7 +1547,7 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): # Workaround for missing OneOf schema support by the generator # Checks if the defined schema is a subset of received model # This way we can ensure forward-compatibility support of new fields in API - assert set(oneof_class.openapi_types.keys()) <= set(model_kwargs.keys()) + assert len(set(model_kwargs.keys()).difference(set(oneof_class.openapi_types.keys()))) == 0 or set(oneof_class.openapi_types.keys()) <= set(model_kwargs.keys()) else: if issubclass(oneof_class, ModelSimple): diff --git a/gooddata-api-client/gooddata_api_client/model_utils.py b/gooddata-api-client/gooddata_api_client/model_utils.py index 498706555..bc91bd70e 100644 --- a/gooddata-api-client/gooddata_api_client/model_utils.py +++ b/gooddata-api-client/gooddata_api_client/model_utils.py @@ -1877,7 +1877,7 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): # Workaround for missing OneOf schema support by the generator # Checks if the defined schema is a subset of received model # This way we can ensure forward-compatibility support of new fields in API - assert set(oneof_class.openapi_types.keys()) <= set(model_kwargs.keys()) + assert len(set(model_kwargs.keys()).difference(set(oneof_class.openapi_types.keys()))) == 0 or set(oneof_class.openapi_types.keys()) <= set(model_kwargs.keys()) else: if issubclass(oneof_class, ModelSimple): From ada6cb0eb0ad6a2b5628a935b2db0acd56deafae Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Tue, 15 Oct 2024 13:49:32 +0200 Subject: [PATCH 3/4] feat: add support for ExportDefinition JIRA: PSDK-209 risk: low --- docker-compose.yaml | 4 + gooddata-sdk/gooddata_sdk/__init__.py | 4 + .../gooddata_sdk/catalog/export/request.py | 2 +- .../analytics_model/analytics_model.py | 76 +++++++++---------- .../workspace/analytics_model/base.py | 41 ++++++++++ .../analytics_model/export_definition.py | 43 +++++++++++ 6 files changed, 128 insertions(+), 42 deletions(-) create mode 100644 gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/base.py create mode 100644 gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/export_definition.py diff --git a/docker-compose.yaml b/docker-compose.yaml index bfc548ef8..772a47c91 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -20,6 +20,10 @@ services: GDC_FEATURES_VALUES_ENABLE_ANALYTICAL_DASHBOARD_PERMISSIONS: "true" GDC_FEATURES_VALUES_ENABLE_METRIC_SQL_AND_DATA_EXPLAIN: 'ENABLED' GDC_FEATURES_VALUES_ENABLE_ROLLUP_TOTALS: "true" + GDC_FEATURES_VALUES_ENABLE_ROLLUP_TOTALS_FOR_METRICS: "true" + GDC_FEATURES_VALUES_ENABLE_SCHEDULING: "true" + GDC_FEATURES_VALUES_ENABLE_ALERTING: "true" + GDC_FEATURES_VALUES_ENABLE_SMTP: "true" # In the case of failing tests (HTTP 500), you can increase the memory for the metadata API # METADATA_API_JAVA_OPTS: "-Xmx1024m -Xms512m" gooddata-fdw: diff --git a/gooddata-sdk/gooddata_sdk/__init__.py b/gooddata-sdk/gooddata_sdk/__init__.py index 97b29a713..2dcf04506 100644 --- a/gooddata-sdk/gooddata_sdk/__init__.py +++ b/gooddata-sdk/gooddata_sdk/__init__.py @@ -135,6 +135,10 @@ CatalogDeclarativeAnalytics, CatalogDeclarativeMetric, ) +from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.export_definition import ( + CatalogDeclarativeExportDefinition, + CatalogDeclarativeExportDefinitionRequestPayload, +) from gooddata_sdk.catalog.workspace.declarative_model.workspace.logical_model.data_filter_references import ( CatalogDeclarativeWorkspaceDataFilterReferences, ) diff --git a/gooddata-sdk/gooddata_sdk/catalog/export/request.py b/gooddata-sdk/gooddata_sdk/catalog/export/request.py index 853abed5d..d62cbb0b4 100644 --- a/gooddata-sdk/gooddata_sdk/catalog/export/request.py +++ b/gooddata-sdk/gooddata_sdk/catalog/export/request.py @@ -63,8 +63,8 @@ class ExportRequest(Base): """ format: str - execution_result: str file_name: str + execution_result: Optional[str] = None settings: Optional[ExportSettings] = None custom_override: Optional[ExportCustomOverride] = None diff --git a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/analytics_model.py b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/analytics_model.py index 6bfcc0066..6181e6570 100644 --- a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/analytics_model.py +++ b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/analytics_model.py @@ -2,9 +2,10 @@ from __future__ import annotations from pathlib import Path -from typing import Any, Optional, TypeVar, Union +from typing import Any, Optional, Union import attr +from attrs import define from cattrs import global_converter, structure from gooddata_api_client.model.declarative_analytical_dashboard import DeclarativeAnalyticalDashboard from gooddata_api_client.model.declarative_analytical_dashboard_extension import DeclarativeAnalyticalDashboardExtension @@ -17,14 +18,19 @@ from gooddata_api_client.model.declarative_visualization_object import DeclarativeVisualizationObject from gooddata_sdk.catalog.base import Base -from gooddata_sdk.catalog.identifier import CatalogUserIdentifier from gooddata_sdk.catalog.permission.declarative_model.permission import ( CatalogDeclarativeDashboardPermissionsForAssignee, CatalogDeclarativeDashboardPermissionsForAssigneeRule, ) -from gooddata_sdk.utils import create_directory, get_sorted_yaml_files, read_layout_from_file, write_layout_to_file +from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.base import ( + CatalogAnalyticsBase, + CatalogAnalyticsObjectBase, +) +from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.export_definition import ( + CatalogDeclarativeExportDefinition, +) +from gooddata_sdk.utils import create_directory, get_sorted_yaml_files -T = TypeVar("T", bound="CatalogAnalyticsObjectBase") AnalyticsObjects = Union[ DeclarativeAnalyticalDashboard, DeclarativeDashboardPlugin, @@ -41,6 +47,7 @@ LAYOUT_METRICS_DIR = "metrics" LAYOUT_VISUALIZATION_OBJECTS_DIR = "visualization_objects" ATTRIBUTE_HIERARCHY_OBJECTS_DIR = "attribute_hierarchy_objects" +EXPORT_DEFINITION_DIR = "export_definitions" @attr.s(auto_attribs=True, kw_only=True) @@ -70,7 +77,7 @@ class CatalogDeclarativeAnalyticsLayer(Base): filter_contexts: list[CatalogDeclarativeFilterContext] = attr.field(factory=list) metrics: list[CatalogDeclarativeMetric] = attr.field(factory=list) visualization_objects: list[CatalogDeclarativeVisualizationObject] = attr.field(factory=list) - export_definitions: list[dict] = attr.field(factory=list) + export_definitions: list[CatalogDeclarativeExportDefinition] = attr.field(factory=list) @staticmethod def client_class() -> type[DeclarativeAnalyticsLayer]: @@ -124,6 +131,12 @@ def get_attribute_hierarchy_folder(analytics_model_folder: Path) -> Path: create_directory(folder) return folder + @staticmethod + def get_export_definition_dif(analytics_model_folder: Path) -> Path: + folder = analytics_model_folder / EXPORT_DEFINITION_DIR + create_directory(folder) + return folder + def store_to_disk(self, workspace_folder: Path) -> None: analytics_model_folder = self.get_analytics_model_folder(workspace_folder) @@ -134,6 +147,7 @@ def store_to_disk(self, workspace_folder: Path) -> None: metrics_folder = self.get_metrics_folder(analytics_model_folder) visualization_objects_folder = self.get_visualization_objects_folder(analytics_model_folder) attribute_hierarchy_folder = self.get_attribute_hierarchy_folder(analytics_model_folder) + export_definition_folder = self.get_export_definition_dif(analytical_dashboards_folder) for analytical_dashboard in self.analytical_dashboards: analytical_dashboard.store_to_disk(analytical_dashboards_folder) @@ -156,6 +170,9 @@ def store_to_disk(self, workspace_folder: Path) -> None: for attribute_hierarchy in self.attribute_hierarchies: attribute_hierarchy.store_to_disk(attribute_hierarchy_folder) + for export_definition in self.export_definitions: + export_definition.store_to_disk(export_definition_folder) + @classmethod def load_from_disk(cls, workspace_folder: Path) -> CatalogDeclarativeAnalyticsLayer: analytics_model_folder = cls.get_analytics_model_folder(workspace_folder) @@ -166,6 +183,7 @@ def load_from_disk(cls, workspace_folder: Path) -> CatalogDeclarativeAnalyticsLa metrics_folder = cls.get_metrics_folder(analytics_model_folder) visualization_objects_folder = cls.get_visualization_objects_folder(analytics_model_folder) attribute_hierarchy_folder = cls.get_attribute_hierarchy_folder(analytics_model_folder) + export_definition_folder = cls.get_export_definition_dif(analytical_dashboards_folder) analytical_dashboard_files = get_sorted_yaml_files(analytical_dashboards_folder) analytical_dashboard_extension_files = get_sorted_yaml_files(analytical_dashboard_extensions_folder) @@ -174,6 +192,7 @@ def load_from_disk(cls, workspace_folder: Path) -> CatalogDeclarativeAnalyticsLa metric_files = get_sorted_yaml_files(metrics_folder) visualization_object_files = get_sorted_yaml_files(visualization_objects_folder) attribute_hierarchy_files = get_sorted_yaml_files(attribute_hierarchy_folder) + export_definition_files = get_sorted_yaml_files(export_definition_folder) analytical_dashboards = [ CatalogDeclarativeAnalyticalDashboard.load_from_disk(analytical_dashboard_file) @@ -200,6 +219,10 @@ def load_from_disk(cls, workspace_folder: Path) -> CatalogDeclarativeAnalyticsLa CatalogDeclarativeAttributeHierarchy.load_from_disk(attribute_hierarchy_file) for attribute_hierarchy_file in attribute_hierarchy_files ] + export_definitions = [ + CatalogDeclarativeExportDefinition.load_from_disk(export_definition_file) + for export_definition_file in export_definition_files + ] return cls( analytical_dashboards=analytical_dashboards, analytical_dashboard_extensions=analytical_dashboard_extensions, @@ -208,41 +231,12 @@ def load_from_disk(cls, workspace_folder: Path) -> CatalogDeclarativeAnalyticsLa filter_contexts=filter_contexts, metrics=metrics, visualization_objects=visualization_objects, + export_definitions=export_definitions, ) -@attr.s(auto_attribs=True, kw_only=True) -class CatalogAnalyticsObjectBase(Base): - id: str - - def store_to_disk(self, analytics_folder: Path) -> None: - analytics_file = analytics_folder / f"{self.id}.yaml" - write_layout_to_file(analytics_file, self.to_api().to_dict(camel_case=True)) - - @classmethod - def load_from_disk(cls: type[T], analytics_file: Path) -> T: - analytics_layout = read_layout_from_file(analytics_file) - return cls.from_dict(analytics_layout) - - -@attr.s(auto_attribs=True, kw_only=True) -class CatalogAnalyticsBase(CatalogAnalyticsObjectBase): - title: str - content: dict[str, Any] - description: Optional[str] = None - tags: Optional[list[str]] = None - - -@attr.s(auto_attribs=True, kw_only=True) -class CatalogAnalyticsBaseMeta(CatalogAnalyticsBase): - created_at: Optional[str] = None - created_by: Optional[CatalogUserIdentifier] = None - modified_at: Optional[str] = None - modified_by: Optional[CatalogUserIdentifier] = None - - -@attr.s(auto_attribs=True, kw_only=True) -class CatalogDeclarativeAnalyticalDashboard(CatalogAnalyticsBaseMeta): +@define(auto_attribs=True, kw_only=True) +class CatalogDeclarativeAnalyticalDashboard(CatalogAnalyticsBase): permissions: Optional[ list[ Union[ @@ -274,7 +268,7 @@ def structure_permissions( @attr.s(auto_attribs=True, kw_only=True) -class CatalogDeclarativeDashboardPlugin(CatalogAnalyticsBaseMeta): +class CatalogDeclarativeDashboardPlugin(CatalogAnalyticsBase): @staticmethod def client_class() -> type[DeclarativeDashboardPlugin]: return DeclarativeDashboardPlugin @@ -299,21 +293,21 @@ def client_class() -> type[DeclarativeFilterContext]: @attr.s(auto_attribs=True, kw_only=True) -class CatalogDeclarativeMetric(CatalogAnalyticsBaseMeta): +class CatalogDeclarativeMetric(CatalogAnalyticsBase): @staticmethod def client_class() -> type[DeclarativeMetric]: return DeclarativeMetric @attr.s(auto_attribs=True, kw_only=True) -class CatalogDeclarativeVisualizationObject(CatalogAnalyticsBaseMeta): +class CatalogDeclarativeVisualizationObject(CatalogAnalyticsBase): @staticmethod def client_class() -> type[DeclarativeVisualizationObject]: return DeclarativeVisualizationObject @attr.s(auto_attribs=True, kw_only=True) -class CatalogDeclarativeAttributeHierarchy(CatalogAnalyticsBaseMeta): +class CatalogDeclarativeAttributeHierarchy(CatalogAnalyticsBase): @staticmethod def client_class() -> type[DeclarativeAttributeHierarchy]: return DeclarativeAttributeHierarchy diff --git a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/base.py b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/base.py new file mode 100644 index 000000000..0016b2b83 --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/base.py @@ -0,0 +1,41 @@ +# (C) 2024 GoodData Corporation +from pathlib import Path +from typing import Any, Optional, TypeVar + +from attrs import define + +from gooddata_sdk.catalog.base import Base +from gooddata_sdk.catalog.identifier import CatalogUserIdentifier +from gooddata_sdk.utils import read_layout_from_file, write_layout_to_file + +T = TypeVar("T", bound="CatalogAnalyticsObjectBase") + + +@define(auto_attribs=True, kw_only=True) +class CatalogAnalyticsObjectBase(Base): + id: str + + def store_to_disk(self, analytics_folder: Path) -> None: + analytics_file = analytics_folder / f"{self.id}.yaml" + write_layout_to_file(analytics_file, self.to_api().to_dict(camel_case=True)) + + @classmethod + def load_from_disk(cls: type[T], analytics_file: Path) -> T: + analytics_layout = read_layout_from_file(analytics_file) + return cls.from_dict(analytics_layout) + + +@define(auto_attribs=True, kw_only=True) +class CatalogAnalyticsBaseMeta(CatalogAnalyticsObjectBase): + created_at: Optional[str] = None + created_by: Optional[CatalogUserIdentifier] = None + modified_at: Optional[str] = None + modified_by: Optional[CatalogUserIdentifier] = None + + +@define(auto_attribs=True, kw_only=True) +class CatalogAnalyticsBase(CatalogAnalyticsBaseMeta): + title: str + content: dict[str, Any] + description: Optional[str] = None + tags: Optional[list[str]] = None diff --git a/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/export_definition.py b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/export_definition.py new file mode 100644 index 000000000..2baf7862a --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model/export_definition.py @@ -0,0 +1,43 @@ +# (C) 2024 GoodData Corporation +from typing import Optional + +from attrs import define +from gooddata_api_client.model.declarative_export_definition import DeclarativeExportDefinition +from gooddata_api_client.model.declarative_export_definition_request_payload import ( + DeclarativeExportDefinitionRequestPayload, +) + +from gooddata_sdk import ExportCustomOverride, ExportSettings +from gooddata_sdk.catalog.base import Base +from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.base import CatalogAnalyticsBaseMeta + + +@define(auto_attribs=True, kw_only=True) +class CatalogDeclarativeExportDefinitionRequestPayload(Base): + custom_override: Optional[ExportCustomOverride] = None + execution_result: Optional[str] = None + metadata: Optional[dict] = None + related_dashboard_id: Optional[str] = None + settings: Optional[ExportSettings] = None + visualization_object: Optional[str] = None + visualization_object_custom_filters: Optional[list[dict]] = None + file_name: Optional[str] = None + format: Optional[str] = None + dashboard_id: Optional[str] = None + + @staticmethod + def client_class() -> type[DeclarativeExportDefinitionRequestPayload]: + return DeclarativeExportDefinitionRequestPayload + + +@define(auto_attribs=True, kw_only=True) +class CatalogDeclarativeExportDefinition(CatalogAnalyticsBaseMeta): + id: str + title: str + request_payload: CatalogDeclarativeExportDefinitionRequestPayload + description: Optional[str] = None + tags: Optional[list[str]] = None + + @staticmethod + def client_class() -> type[DeclarativeExportDefinition]: + return DeclarativeExportDefinition From 68949c883c578acf5a2a6ee6ddf9bde2dc4bbd01 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Tue, 15 Oct 2024 13:49:43 +0200 Subject: [PATCH 4/4] test: add test for ExportDefinition JIRA: PSDK-209 risk: low --- .../export_definition_analytics_layout.yaml | 6019 +++++++++++++++++ .../catalog/test_catalog_workspace_content.py | 25 + 2 files changed, 6044 insertions(+) create mode 100644 gooddata-sdk/tests/catalog/fixtures/workspace_content/export_definition_analytics_layout.yaml diff --git a/gooddata-sdk/tests/catalog/fixtures/workspace_content/export_definition_analytics_layout.yaml b/gooddata-sdk/tests/catalog/fixtures/workspace_content/export_definition_analytics_layout.yaml new file mode 100644 index 000000000..2605ca101 --- /dev/null +++ b/gooddata-sdk/tests/catalog/fixtures/workspace_content/export_definition_analytics_layout.yaml @@ -0,0 +1,6019 @@ +# (C) 2024 GoodData Corporation +version: 1 +interactions: + - request: + method: GET + uri: http://localhost:3000/api/v1/layout/workspaces/demo/analyticsModel?exclude=ACTIVITY_INFO + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - br, gzip, deflate + X-GDC-VALIDATE-RELATIONS: + - 'true' + X-Requested-With: + - XMLHttpRequest + response: + status: + code: 200 + message: OK + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - Content-Disposition, Content-Length, Content-Range, Set-Cookie + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Connection: + - keep-alive + Content-Security-Policy: + - 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline'' + ''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com + src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com; + img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com + cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com + *.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src + ''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src + ''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com + *.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net + matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com + *.wistia.net embedwistia-a.akamaihd.net' + Content-Type: + - application/json + DATE: &id001 + - PLACEHOLDER + Expires: + - '0' + GoodData-Deployment: + - aio + Permission-Policy: + - geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera + 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment + 'none'; + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - nginx + Transfer-Encoding: + - chunked + Vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + X-Content-Type-Options: + - nosniff + X-GDC-TRACE-ID: *id001 + X-XSS-Protection: + - '0' + content-length: + - '27755' + set-cookie: + - SPRING_REDIRECT_URI=; Max-Age=0; Expires=Tue, 15 Oct 2024 11:44:26 GMT; + Path=/; HTTPOnly; SameSite=Lax + body: + string: + analytics: + analyticalDashboardExtensions: [] + analyticalDashboards: + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + header: + title: Spend breakdown and Revenue + description: The first insight shows a breakdown of spend + by category and campaign. The second shows revenue per + $ spend, for each campaign, to demonstrate, how campaigns + are successful. + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Campaign Spend + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: campaign_spend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue per $ vs Spend by Campaign + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: revenue_per_usd_vs_spend_by_campaign + type: visualizationObject + drills: [] + properties: {} + version: '2' + description: '' + id: campaign + permissions: + - assigneeRule: + type: allWorkspaceUsers + name: VIEW + title: Campaign + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + sections: + - items: + - size: + xl: + gridWidth: 12 + type: IDashboardLayoutItem + widget: + description: '' + drills: [] + ignoreDashboardFilters: [] + insight: + identifier: + id: top_10_products + type: visualizationObject + properties: {} + title: DHO simple + type: insight + type: IDashboardLayoutSection + type: IDashboardLayout + plugins: + - plugin: + identifier: + id: dashboard_plugin_1 + type: dashboardPlugin + version: '2' + version: '2' + id: dashboard_plugin + title: Dashboard plugin + - content: + filterContextRef: + identifier: + id: region_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Top 10 Products + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: top_10_products + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: revenue_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Customers Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: customers_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Categories Pie Chart + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_categories_pie_chart + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Breakdown + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_breakdown + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Saleability + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_saleability + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 12 + widget: + type: insight + title: '% Revenue per Product by Customer and Category' + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: percent_revenue_per_product_by_customer_and_category + type: visualizationObject + drills: [] + properties: {} + version: '2' + description: '' + id: product_and_category + title: Product & Category + attributeHierarchies: [] + dashboardPlugins: + - content: + url: https://www.example.com + version: '2' + description: Testing record dashboard_plugin_1 + id: dashboard_plugin_1 + title: dashboard_plugin_1 + - content: + url: https://www.example.com + version: '2' + description: Testing record dashboard_plugin_2 + id: dashboard_plugin_2 + title: dashboard_plugin_2 + exportDefinitions: [] + filterContexts: + - content: + filters: + - dateFilter: + from: '0' + to: '0' + granularity: GDC.time.month + type: relative + - attributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 14b0807447ef4bc28f43e4fc5c337d1d + filterElementsBy: [] + version: '2' + description: '' + id: campaign_name_filter + title: filterContext + - content: + filters: + - attributeFilter: + displayForm: + identifier: + id: region + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 2d5ef8df82444f6ba27b45f0990ee6af + filterElementsBy: [] + version: '2' + description: '' + id: region_filter + title: filterContext + metrics: + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/customer_id},{attribute/order_line_id}) + id: amount_of_active_customers + title: '# of Active Customers' + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/order_id}) + id: amount_of_orders + title: '# of Orders' + - content: + format: '#,##0' + maql: 'SELECT {metric/amount_of_active_customers} WHERE (SELECT + {metric/revenue} BY {attribute/customer_id}) > 10000 ' + id: amount_of_top_customers + title: '# of Top Customers' + - content: + format: '#,##0.00' + maql: SELECT {metric/amount_of_orders} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + description: '' + id: amount_of_valid_orders + title: '# of Valid Orders' + - content: + format: $#,##0 + maql: SELECT SUM({fact/spend}) + id: campaign_spend + title: Campaign Spend + - content: + format: $#,##0 + maql: SELECT SUM({fact/price}*{fact/quantity}) + id: order_amount + title: Order Amount + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / {metric/total_revenue} + id: percent_revenue + title: '% Revenue' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_customers + title: '% Revenue from Top 10 Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_customers + title: '% Revenue from Top 10% Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_products + title: '% Revenue from Top 10% Products' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_products + title: '% Revenue from Top 10 Products' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY {attribute/products.category}, + ALL OTHER) + id: percent_revenue_in_category + title: '% Revenue in Category' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY ALL + {attribute/product_id}) + id: percent_revenue_per_product + title: '% Revenue per Product' + - content: + format: $#,##0 + maql: SELECT {metric/order_amount} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + description: '' + id: revenue + title: Revenue + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Clothing") + id: revenue-clothing + title: Revenue (Clothing) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ( "Electronics") + id: revenue-electronic + title: Revenue (Electronic) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Home") + id: revenue-home + title: Revenue (Home) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Outdoor") + id: revenue-outdoor + title: Revenue (Outdoor) + - content: + format: $#,##0.0 + maql: SELECT AVG(SELECT {metric/revenue} BY {attribute/customer_id}) + id: revenue_per_customer + title: Revenue per Customer + - content: + format: $#,##0.0 + maql: SELECT {metric/revenue} / {metric/campaign_spend} + id: revenue_per_dollar_spent + title: Revenue per Dollar Spent + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10) OF ({metric/revenue}) + id: revenue_top_10 + title: Revenue / Top 10 + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10%) OF ({metric/revenue}) + id: revenue_top_10_percent + title: Revenue / Top 10% + - content: + format: $#,##0 + maql: SELECT {metric/revenue} BY ALL OTHER + id: total_revenue + title: Total Revenue + - content: + format: $#,##0 + maql: SELECT {metric/total_revenue} WITHOUT PARENT FILTER + id: total_revenue-no_filters + title: Total Revenue (No Filters) + visualizationObjects: + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: d319bcb2d8c04442a684e3b3cd063381 + title: Campaign Spend + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_channels.category + type: label + localIdentifier: 291c085e7df8420db84117ca49f59c49 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: d9dd143d647d4d148405a60ec2cf59bc + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: type + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_channels.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: campaign_spend + title: Campaign Spend + - content: + buckets: + - items: + - measure: + alias: Active Customers + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 2ba0b87b59ca41a4b1530e81a5c1d081 + title: '# of Active Customers' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_customer + type: metric + localIdentifier: ec0606894b9f4897b7beaf1550608928 + title: Revenue per Customer + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 0de7d7f08af7480aa636857a26be72b6 + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -12 + granularity: GDC.time.month + to: -1 + properties: + controls: + colorMapping: + - color: + type: guid + value: '20' + id: 2ba0b87b59ca41a4b1530e81a5c1d081 + - color: + type: guid + value: '4' + id: ec0606894b9f4897b7beaf1550608928 + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - ec0606894b9f4897b7beaf1550608928 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: customers_trend + title: Customers Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_per_product + type: metric + localIdentifier: 08d8346c1ce7438994b251991c0fbf65 + title: '% Revenue per Product' + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: b2350c06688b4da9b3833ebcce65527f + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: 7a4045fd00ac44579f52406df679435f + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 6a003ffd14994237ba64c4a02c488429 + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 75ea396d0c8b48098e31dccf8b5801d3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 7a4045fd00ac44579f52406df679435f + direction: asc + version: '2' + visualizationUrl: local:table + id: percent_revenue_per_product_by_customer_and_category + title: '% Revenue per Product by Customer and Category' + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 1a14cdc1293c46e89a2e25d3e741d235 + title: '# of Active Customers' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: c1feca1864244ec2ace7a9b9d7fda231 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: region + type: label + localIdentifier: 530cddbd7ca04d039e73462d81ed44d5 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: region + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + properties: + controls: + legend: + position: bottom + stackMeasuresToPercent: true + version: '2' + visualizationUrl: local:area + id: percentage_of_customers_by_region + title: Percentage of Customers by Region + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 590d332ef686468b8878ae41b23341c6 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: b166c71091864312a14c7ae8ff886ffe + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: e920a50e0bbb49788df0aac53634c1cd + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: product_breakdown + title: Product Breakdown + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: true + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 162b857af49d45769bc12604a5c192b9 + title: '% Revenue' + format: '#,##0.00%' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + legend: + position: bottom + version: '2' + visualizationUrl: local:donut + id: product_categories_pie_chart + title: Product Categories Pie Chart + - content: + buckets: + - items: + - measure: + alias: Previous Period + definition: + popMeasureDefinition: + measureIdentifier: c82e025fa2db4afea9a600a424591dbe + popAttribute: + identifier: + id: date.year + type: attribute + localIdentifier: c82e025fa2db4afea9a600a424591dbe_pop + - measure: + alias: This Period + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: c82e025fa2db4afea9a600a424591dbe + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: c804ef5ba7944a5a9f360c86a9e95e9a + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + stackMeasures: false + xaxis: + name: + visible: false + yaxis: + name: + visible: false + version: '2' + visualizationUrl: local:column + id: product_revenue_comparison-over_previous_period + title: Product Revenue Comparison (over previous period) + - content: + buckets: + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: aeb5d51a162d4b59aba3bd6ddebcc780 + title: '# of Orders' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 94b3edd3a73c4a48a4d13bbe9442cc98 + title: Revenue + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: d2a991bdd123448eb2be73d79f1180c4 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + grid: + enabled: true + version: '2' + visualizationUrl: local:scatter + id: product_saleability + title: Product Saleability + - content: + buckets: + - items: + - measure: + alias: Items Sold + definition: + measureDefinition: + aggregation: sum + filters: [] + item: + identifier: + id: quantity + type: fact + format: '#,##0.00' + localIdentifier: 29486504dd0e4a36a18b0b2f792d3a46 + title: Sum of Quantity + - measure: + definition: + measureDefinition: + aggregation: avg + filters: [] + item: + identifier: + id: price + type: fact + format: '#,##0.00' + localIdentifier: aa6391acccf1452f8011201aef9af492 + title: Avg Price + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_in_category + type: metric + localIdentifier: 2cd39539d8da46c9883e63caa3ba7cc0 + title: '% Revenue in Category' + - measure: + alias: Total Revenue + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 9a0f08331c094c7facf2a0b4f418de0a + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 06bc6b3b9949466494e4f594c11f1bff + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 192668bfb6a74e9ab7b5d1ce7cb68ea3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 06bc6b3b9949466494e4f594c11f1bff + direction: asc + version: '2' + visualizationUrl: local:table + id: revenue_and_quantity_by_product_and_category + title: Revenue and Quantity by Product and Category + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 7df6c34387744d69b23ec92e1a5cf543 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 4bb4fc1986c546de9ad976e6ec23fed4 + localIdentifier: trend + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 34bddcb1cd024902a82396216b0fa9d8 + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + granularity: GDC.time.year + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:line + id: revenue_by_category_trend + title: Revenue by Category Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 4ae3401bdbba4938afe983df4ba04e1c + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 1c8ba72dbfc84ddd913bf81dc355c427 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + version: '2' + visualizationUrl: local:bar + id: revenue_by_product + title: Revenue by Product + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: 13a50d811e474ac6808d8da7f4673b35 + title: Campaign Spend + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_dollar_spent + type: metric + localIdentifier: a0f15e82e6334280a44dbedc7d086e7c + title: Revenue per Dollar Spent + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: 1d9fa968bafb423eb29c938dfb1207ff + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + xaxis: + min: '0' + yaxis: + min: '0' + version: '2' + visualizationUrl: local:scatter + id: revenue_per_usd_vs_spend_by_campaign + title: Revenue per $ vs Spend by Campaign + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 60c854969a9c4c278ab596d99c222e92 + title: Revenue + localIdentifier: measures + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: c2fa7ef48cc54af99f8c280eb451e051 + title: '# of Orders' + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 413ac374b65648fa96826ca01d47bdda + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -3 + granularity: GDC.time.quarter + to: 0 + properties: + controls: + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - c2fa7ef48cc54af99f8c280eb451e051 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: revenue_trend + title: Revenue Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 3f127ccfe57a40399e23f9ae2a4ad810 + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: f4e39e24f11e4827a191c30d65c89d2c + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: state + type: label + localIdentifier: bbccd430176d428caed54c99afc9589e + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: state + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_customers + title: Top 10 Customers + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 77dc71bbac92412bac5f94284a5919df + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 781952e728204dcf923142910cc22ae2 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_products + title: Top 10 Products + - request: + method: PUT + uri: http://localhost:3000/api/v1/layout/workspaces/demo/analyticsModel + body: + analytics: + analyticalDashboards: + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + header: + title: Spend breakdown and Revenue + description: The first insight shows a breakdown of spend + by category and campaign. The second shows revenue per $ + spend, for each campaign, to demonstrate, how campaigns + are successful. + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Campaign Spend + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: campaign_spend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue per $ vs Spend by Campaign + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: revenue_per_usd_vs_spend_by_campaign + type: visualizationObject + drills: [] + properties: {} + version: '2' + id: campaign + title: Campaign + description: '' + permissions: + - name: VIEW + assigneeRule: + type: allWorkspaceUsers + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + sections: + - items: + - size: + xl: + gridWidth: 12 + type: IDashboardLayoutItem + widget: + description: '' + drills: [] + ignoreDashboardFilters: [] + insight: + identifier: + id: top_10_products + type: visualizationObject + properties: {} + title: DHO simple + type: insight + type: IDashboardLayoutSection + type: IDashboardLayout + plugins: + - plugin: + identifier: + id: dashboard_plugin_1 + type: dashboardPlugin + version: '2' + version: '2' + id: dashboard_plugin + title: Dashboard plugin + - content: + filterContextRef: + identifier: + id: region_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Top 10 Products + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: top_10_products + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: revenue_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Customers Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: customers_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Categories Pie Chart + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_categories_pie_chart + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Breakdown + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_breakdown + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Saleability + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_saleability + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 12 + widget: + type: insight + title: '% Revenue per Product by Customer and Category' + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: percent_revenue_per_product_by_customer_and_category + type: visualizationObject + drills: [] + properties: {} + version: '2' + id: product_and_category + title: Product & Category + description: '' + analyticalDashboardExtensions: [] + attributeHierarchies: [] + dashboardPlugins: + - content: + url: https://www.example.com + version: '2' + id: dashboard_plugin_1 + title: dashboard_plugin_1 + description: Testing record dashboard_plugin_1 + - content: + url: https://www.example.com + version: '2' + id: dashboard_plugin_2 + title: dashboard_plugin_2 + description: Testing record dashboard_plugin_2 + filterContexts: + - content: + filters: + - dateFilter: + from: '0' + to: '0' + granularity: GDC.time.month + type: relative + - attributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 14b0807447ef4bc28f43e4fc5c337d1d + filterElementsBy: [] + version: '2' + id: campaign_name_filter + title: filterContext + description: '' + - content: + filters: + - attributeFilter: + displayForm: + identifier: + id: region + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 2d5ef8df82444f6ba27b45f0990ee6af + filterElementsBy: [] + version: '2' + id: region_filter + title: filterContext + description: '' + metrics: + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/customer_id},{attribute/order_line_id}) + id: amount_of_active_customers + title: '# of Active Customers' + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/order_id}) + id: amount_of_orders + title: '# of Orders' + - content: + format: '#,##0' + maql: 'SELECT {metric/amount_of_active_customers} WHERE (SELECT {metric/revenue} + BY {attribute/customer_id}) > 10000 ' + id: amount_of_top_customers + title: '# of Top Customers' + - content: + format: '#,##0.00' + maql: SELECT {metric/amount_of_orders} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + id: amount_of_valid_orders + title: '# of Valid Orders' + description: '' + - content: + format: $#,##0 + maql: SELECT SUM({fact/spend}) + id: campaign_spend + title: Campaign Spend + - content: + format: $#,##0 + maql: SELECT SUM({fact/price}*{fact/quantity}) + id: order_amount + title: Order Amount + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / {metric/total_revenue} + id: percent_revenue + title: '% Revenue' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_customers + title: '% Revenue from Top 10 Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_customers + title: '% Revenue from Top 10% Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_products + title: '% Revenue from Top 10% Products' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_products + title: '% Revenue from Top 10 Products' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY {attribute/products.category}, + ALL OTHER) + id: percent_revenue_in_category + title: '% Revenue in Category' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY ALL {attribute/product_id}) + id: percent_revenue_per_product + title: '% Revenue per Product' + - content: + format: $#,##0 + maql: SELECT {metric/order_amount} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + id: revenue + title: Revenue + description: '' + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN ("Clothing") + id: revenue-clothing + title: Revenue (Clothing) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN ( + "Electronics") + id: revenue-electronic + title: Revenue (Electronic) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN ("Home") + id: revenue-home + title: Revenue (Home) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN ("Outdoor") + id: revenue-outdoor + title: Revenue (Outdoor) + - content: + format: $#,##0.0 + maql: SELECT AVG(SELECT {metric/revenue} BY {attribute/customer_id}) + id: revenue_per_customer + title: Revenue per Customer + - content: + format: $#,##0.0 + maql: SELECT {metric/revenue} / {metric/campaign_spend} + id: revenue_per_dollar_spent + title: Revenue per Dollar Spent + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10) OF ({metric/revenue}) + id: revenue_top_10 + title: Revenue / Top 10 + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10%) OF ({metric/revenue}) + id: revenue_top_10_percent + title: Revenue / Top 10% + - content: + format: $#,##0 + maql: SELECT {metric/revenue} BY ALL OTHER + id: total_revenue + title: Total Revenue + - content: + format: $#,##0 + maql: SELECT {metric/total_revenue} WITHOUT PARENT FILTER + id: total_revenue-no_filters + title: Total Revenue (No Filters) + visualizationObjects: + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: d319bcb2d8c04442a684e3b3cd063381 + title: Campaign Spend + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_channels.category + type: label + localIdentifier: 291c085e7df8420db84117ca49f59c49 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: d9dd143d647d4d148405a60ec2cf59bc + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: type + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_channels.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: campaign_spend + title: Campaign Spend + - content: + buckets: + - items: + - measure: + alias: Active Customers + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 2ba0b87b59ca41a4b1530e81a5c1d081 + title: '# of Active Customers' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_customer + type: metric + localIdentifier: ec0606894b9f4897b7beaf1550608928 + title: Revenue per Customer + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 0de7d7f08af7480aa636857a26be72b6 + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -12 + granularity: GDC.time.month + to: -1 + properties: + controls: + colorMapping: + - color: + type: guid + value: '20' + id: 2ba0b87b59ca41a4b1530e81a5c1d081 + - color: + type: guid + value: '4' + id: ec0606894b9f4897b7beaf1550608928 + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - ec0606894b9f4897b7beaf1550608928 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: customers_trend + title: Customers Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_per_product + type: metric + localIdentifier: 08d8346c1ce7438994b251991c0fbf65 + title: '% Revenue per Product' + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: b2350c06688b4da9b3833ebcce65527f + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: 7a4045fd00ac44579f52406df679435f + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 6a003ffd14994237ba64c4a02c488429 + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 75ea396d0c8b48098e31dccf8b5801d3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 7a4045fd00ac44579f52406df679435f + direction: asc + version: '2' + visualizationUrl: local:table + id: percent_revenue_per_product_by_customer_and_category + title: '% Revenue per Product by Customer and Category' + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 1a14cdc1293c46e89a2e25d3e741d235 + title: '# of Active Customers' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: c1feca1864244ec2ace7a9b9d7fda231 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: region + type: label + localIdentifier: 530cddbd7ca04d039e73462d81ed44d5 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: region + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + properties: + controls: + legend: + position: bottom + stackMeasuresToPercent: true + version: '2' + visualizationUrl: local:area + id: percentage_of_customers_by_region + title: Percentage of Customers by Region + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 590d332ef686468b8878ae41b23341c6 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: b166c71091864312a14c7ae8ff886ffe + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: e920a50e0bbb49788df0aac53634c1cd + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: product_breakdown + title: Product Breakdown + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: true + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 162b857af49d45769bc12604a5c192b9 + title: '% Revenue' + format: '#,##0.00%' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + legend: + position: bottom + version: '2' + visualizationUrl: local:donut + id: product_categories_pie_chart + title: Product Categories Pie Chart + - content: + buckets: + - items: + - measure: + alias: Previous Period + definition: + popMeasureDefinition: + measureIdentifier: c82e025fa2db4afea9a600a424591dbe + popAttribute: + identifier: + id: date.year + type: attribute + localIdentifier: c82e025fa2db4afea9a600a424591dbe_pop + - measure: + alias: This Period + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: c82e025fa2db4afea9a600a424591dbe + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: c804ef5ba7944a5a9f360c86a9e95e9a + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + stackMeasures: false + xaxis: + name: + visible: false + yaxis: + name: + visible: false + version: '2' + visualizationUrl: local:column + id: product_revenue_comparison-over_previous_period + title: Product Revenue Comparison (over previous period) + - content: + buckets: + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: aeb5d51a162d4b59aba3bd6ddebcc780 + title: '# of Orders' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 94b3edd3a73c4a48a4d13bbe9442cc98 + title: Revenue + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: d2a991bdd123448eb2be73d79f1180c4 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + grid: + enabled: true + version: '2' + visualizationUrl: local:scatter + id: product_saleability + title: Product Saleability + - content: + buckets: + - items: + - measure: + alias: Items Sold + definition: + measureDefinition: + aggregation: sum + filters: [] + item: + identifier: + id: quantity + type: fact + format: '#,##0.00' + localIdentifier: 29486504dd0e4a36a18b0b2f792d3a46 + title: Sum of Quantity + - measure: + definition: + measureDefinition: + aggregation: avg + filters: [] + item: + identifier: + id: price + type: fact + format: '#,##0.00' + localIdentifier: aa6391acccf1452f8011201aef9af492 + title: Avg Price + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_in_category + type: metric + localIdentifier: 2cd39539d8da46c9883e63caa3ba7cc0 + title: '% Revenue in Category' + - measure: + alias: Total Revenue + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 9a0f08331c094c7facf2a0b4f418de0a + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 06bc6b3b9949466494e4f594c11f1bff + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 192668bfb6a74e9ab7b5d1ce7cb68ea3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 06bc6b3b9949466494e4f594c11f1bff + direction: asc + version: '2' + visualizationUrl: local:table + id: revenue_and_quantity_by_product_and_category + title: Revenue and Quantity by Product and Category + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 7df6c34387744d69b23ec92e1a5cf543 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 4bb4fc1986c546de9ad976e6ec23fed4 + localIdentifier: trend + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 34bddcb1cd024902a82396216b0fa9d8 + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + granularity: GDC.time.year + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:line + id: revenue_by_category_trend + title: Revenue by Category Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 4ae3401bdbba4938afe983df4ba04e1c + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 1c8ba72dbfc84ddd913bf81dc355c427 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + version: '2' + visualizationUrl: local:bar + id: revenue_by_product + title: Revenue by Product + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: 13a50d811e474ac6808d8da7f4673b35 + title: Campaign Spend + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_dollar_spent + type: metric + localIdentifier: a0f15e82e6334280a44dbedc7d086e7c + title: Revenue per Dollar Spent + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: 1d9fa968bafb423eb29c938dfb1207ff + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + xaxis: + min: '0' + yaxis: + min: '0' + version: '2' + visualizationUrl: local:scatter + id: revenue_per_usd_vs_spend_by_campaign + title: Revenue per $ vs Spend by Campaign + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 60c854969a9c4c278ab596d99c222e92 + title: Revenue + localIdentifier: measures + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: c2fa7ef48cc54af99f8c280eb451e051 + title: '# of Orders' + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 413ac374b65648fa96826ca01d47bdda + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -3 + granularity: GDC.time.quarter + to: 0 + properties: + controls: + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - c2fa7ef48cc54af99f8c280eb451e051 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: revenue_trend + title: Revenue Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 3f127ccfe57a40399e23f9ae2a4ad810 + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: f4e39e24f11e4827a191c30d65c89d2c + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: state + type: label + localIdentifier: bbccd430176d428caed54c99afc9589e + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: state + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_customers + title: Top 10 Customers + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 77dc71bbac92412bac5f94284a5919df + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 781952e728204dcf923142910cc22ae2 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_products + title: Top 10 Products + exportDefinitions: + - id: export_definition_id + title: export_definition_title + requestPayload: + fileName: abc + format: CSV + headers: + Accept-Encoding: + - br, gzip, deflate + Content-Type: + - application/json + X-GDC-VALIDATE-RELATIONS: + - 'true' + X-Requested-With: + - XMLHttpRequest + response: + status: + code: 204 + message: No Content + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - Content-Disposition, Content-Length, Content-Range, Set-Cookie + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Connection: + - keep-alive + Content-Security-Policy: + - 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline'' + ''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com + src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com; + img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com + cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com + *.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src + ''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src + ''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com + *.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net + matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com + *.wistia.net embedwistia-a.akamaihd.net' + DATE: *id001 + Expires: + - '0' + GoodData-Deployment: + - aio + Permission-Policy: + - geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera + 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment + 'none'; + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - nginx + Vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + X-Content-Type-Options: + - nosniff + X-GDC-TRACE-ID: *id001 + X-XSS-Protection: + - '0' + set-cookie: + - SPRING_REDIRECT_URI=; Max-Age=0; Expires=Tue, 15 Oct 2024 11:44:27 GMT; + Path=/; HTTPOnly; SameSite=Lax + body: + string: '' + - request: + method: GET + uri: http://localhost:3000/api/v1/layout/workspaces/demo/analyticsModel?exclude=ACTIVITY_INFO + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - br, gzip, deflate + X-GDC-VALIDATE-RELATIONS: + - 'true' + X-Requested-With: + - XMLHttpRequest + response: + status: + code: 200 + message: OK + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - Content-Disposition, Content-Length, Content-Range, Set-Cookie + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Connection: + - keep-alive + Content-Security-Policy: + - 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline'' + ''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com + src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com; + img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com + cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com + *.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src + ''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src + ''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com + *.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net + matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com + *.wistia.net embedwistia-a.akamaihd.net' + Content-Type: + - application/json + DATE: *id001 + Expires: + - '0' + GoodData-Deployment: + - aio + Permission-Policy: + - geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera + 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment + 'none'; + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - nginx + Transfer-Encoding: + - chunked + Vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + X-Content-Type-Options: + - nosniff + X-GDC-TRACE-ID: *id001 + X-XSS-Protection: + - '0' + content-length: + - '27869' + set-cookie: + - SPRING_REDIRECT_URI=; Max-Age=0; Expires=Tue, 15 Oct 2024 11:44:27 GMT; + Path=/; HTTPOnly; SameSite=Lax + body: + string: + analytics: + analyticalDashboardExtensions: [] + analyticalDashboards: + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + header: + title: Spend breakdown and Revenue + description: The first insight shows a breakdown of spend + by category and campaign. The second shows revenue per + $ spend, for each campaign, to demonstrate, how campaigns + are successful. + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Campaign Spend + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: campaign_spend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue per $ vs Spend by Campaign + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: revenue_per_usd_vs_spend_by_campaign + type: visualizationObject + drills: [] + properties: {} + version: '2' + description: '' + id: campaign + permissions: + - assigneeRule: + type: allWorkspaceUsers + name: VIEW + title: Campaign + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + sections: + - items: + - size: + xl: + gridWidth: 12 + type: IDashboardLayoutItem + widget: + description: '' + drills: [] + ignoreDashboardFilters: [] + insight: + identifier: + id: top_10_products + type: visualizationObject + properties: {} + title: DHO simple + type: insight + type: IDashboardLayoutSection + type: IDashboardLayout + plugins: + - plugin: + identifier: + id: dashboard_plugin_1 + type: dashboardPlugin + version: '2' + version: '2' + id: dashboard_plugin + title: Dashboard plugin + - content: + filterContextRef: + identifier: + id: region_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Top 10 Products + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: top_10_products + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: revenue_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Customers Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: customers_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Categories Pie Chart + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_categories_pie_chart + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Breakdown + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_breakdown + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Saleability + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_saleability + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 12 + widget: + type: insight + title: '% Revenue per Product by Customer and Category' + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: percent_revenue_per_product_by_customer_and_category + type: visualizationObject + drills: [] + properties: {} + version: '2' + description: '' + id: product_and_category + title: Product & Category + attributeHierarchies: [] + dashboardPlugins: + - content: + url: https://www.example.com + version: '2' + description: Testing record dashboard_plugin_1 + id: dashboard_plugin_1 + title: dashboard_plugin_1 + - content: + url: https://www.example.com + version: '2' + description: Testing record dashboard_plugin_2 + id: dashboard_plugin_2 + title: dashboard_plugin_2 + exportDefinitions: + - id: export_definition_id + requestPayload: + fileName: abc + format: CSV + title: export_definition_title + filterContexts: + - content: + filters: + - dateFilter: + from: '0' + to: '0' + granularity: GDC.time.month + type: relative + - attributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 14b0807447ef4bc28f43e4fc5c337d1d + filterElementsBy: [] + version: '2' + description: '' + id: campaign_name_filter + title: filterContext + - content: + filters: + - attributeFilter: + displayForm: + identifier: + id: region + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 2d5ef8df82444f6ba27b45f0990ee6af + filterElementsBy: [] + version: '2' + description: '' + id: region_filter + title: filterContext + metrics: + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/customer_id},{attribute/order_line_id}) + id: amount_of_active_customers + title: '# of Active Customers' + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/order_id}) + id: amount_of_orders + title: '# of Orders' + - content: + format: '#,##0' + maql: 'SELECT {metric/amount_of_active_customers} WHERE (SELECT + {metric/revenue} BY {attribute/customer_id}) > 10000 ' + id: amount_of_top_customers + title: '# of Top Customers' + - content: + format: '#,##0.00' + maql: SELECT {metric/amount_of_orders} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + description: '' + id: amount_of_valid_orders + title: '# of Valid Orders' + - content: + format: $#,##0 + maql: SELECT SUM({fact/spend}) + id: campaign_spend + title: Campaign Spend + - content: + format: $#,##0 + maql: SELECT SUM({fact/price}*{fact/quantity}) + id: order_amount + title: Order Amount + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / {metric/total_revenue} + id: percent_revenue + title: '% Revenue' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_customers + title: '% Revenue from Top 10 Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_customers + title: '% Revenue from Top 10% Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_products + title: '% Revenue from Top 10% Products' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_products + title: '% Revenue from Top 10 Products' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY {attribute/products.category}, + ALL OTHER) + id: percent_revenue_in_category + title: '% Revenue in Category' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY ALL + {attribute/product_id}) + id: percent_revenue_per_product + title: '% Revenue per Product' + - content: + format: $#,##0 + maql: SELECT {metric/order_amount} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + description: '' + id: revenue + title: Revenue + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Clothing") + id: revenue-clothing + title: Revenue (Clothing) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ( "Electronics") + id: revenue-electronic + title: Revenue (Electronic) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Home") + id: revenue-home + title: Revenue (Home) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} IN + ("Outdoor") + id: revenue-outdoor + title: Revenue (Outdoor) + - content: + format: $#,##0.0 + maql: SELECT AVG(SELECT {metric/revenue} BY {attribute/customer_id}) + id: revenue_per_customer + title: Revenue per Customer + - content: + format: $#,##0.0 + maql: SELECT {metric/revenue} / {metric/campaign_spend} + id: revenue_per_dollar_spent + title: Revenue per Dollar Spent + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10) OF ({metric/revenue}) + id: revenue_top_10 + title: Revenue / Top 10 + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10%) OF ({metric/revenue}) + id: revenue_top_10_percent + title: Revenue / Top 10% + - content: + format: $#,##0 + maql: SELECT {metric/revenue} BY ALL OTHER + id: total_revenue + title: Total Revenue + - content: + format: $#,##0 + maql: SELECT {metric/total_revenue} WITHOUT PARENT FILTER + id: total_revenue-no_filters + title: Total Revenue (No Filters) + visualizationObjects: + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: d319bcb2d8c04442a684e3b3cd063381 + title: Campaign Spend + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_channels.category + type: label + localIdentifier: 291c085e7df8420db84117ca49f59c49 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: d9dd143d647d4d148405a60ec2cf59bc + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: type + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_channels.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: campaign_spend + title: Campaign Spend + - content: + buckets: + - items: + - measure: + alias: Active Customers + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 2ba0b87b59ca41a4b1530e81a5c1d081 + title: '# of Active Customers' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_customer + type: metric + localIdentifier: ec0606894b9f4897b7beaf1550608928 + title: Revenue per Customer + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 0de7d7f08af7480aa636857a26be72b6 + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -12 + granularity: GDC.time.month + to: -1 + properties: + controls: + colorMapping: + - color: + type: guid + value: '20' + id: 2ba0b87b59ca41a4b1530e81a5c1d081 + - color: + type: guid + value: '4' + id: ec0606894b9f4897b7beaf1550608928 + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - ec0606894b9f4897b7beaf1550608928 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: customers_trend + title: Customers Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_per_product + type: metric + localIdentifier: 08d8346c1ce7438994b251991c0fbf65 + title: '% Revenue per Product' + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: b2350c06688b4da9b3833ebcce65527f + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: 7a4045fd00ac44579f52406df679435f + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 6a003ffd14994237ba64c4a02c488429 + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 75ea396d0c8b48098e31dccf8b5801d3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 7a4045fd00ac44579f52406df679435f + direction: asc + version: '2' + visualizationUrl: local:table + id: percent_revenue_per_product_by_customer_and_category + title: '% Revenue per Product by Customer and Category' + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 1a14cdc1293c46e89a2e25d3e741d235 + title: '# of Active Customers' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: c1feca1864244ec2ace7a9b9d7fda231 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: region + type: label + localIdentifier: 530cddbd7ca04d039e73462d81ed44d5 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: region + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + properties: + controls: + legend: + position: bottom + stackMeasuresToPercent: true + version: '2' + visualizationUrl: local:area + id: percentage_of_customers_by_region + title: Percentage of Customers by Region + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 590d332ef686468b8878ae41b23341c6 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: b166c71091864312a14c7ae8ff886ffe + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: e920a50e0bbb49788df0aac53634c1cd + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: product_breakdown + title: Product Breakdown + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: true + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 162b857af49d45769bc12604a5c192b9 + title: '% Revenue' + format: '#,##0.00%' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + legend: + position: bottom + version: '2' + visualizationUrl: local:donut + id: product_categories_pie_chart + title: Product Categories Pie Chart + - content: + buckets: + - items: + - measure: + alias: Previous Period + definition: + popMeasureDefinition: + measureIdentifier: c82e025fa2db4afea9a600a424591dbe + popAttribute: + identifier: + id: date.year + type: attribute + localIdentifier: c82e025fa2db4afea9a600a424591dbe_pop + - measure: + alias: This Period + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: c82e025fa2db4afea9a600a424591dbe + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: c804ef5ba7944a5a9f360c86a9e95e9a + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + stackMeasures: false + xaxis: + name: + visible: false + yaxis: + name: + visible: false + version: '2' + visualizationUrl: local:column + id: product_revenue_comparison-over_previous_period + title: Product Revenue Comparison (over previous period) + - content: + buckets: + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: aeb5d51a162d4b59aba3bd6ddebcc780 + title: '# of Orders' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 94b3edd3a73c4a48a4d13bbe9442cc98 + title: Revenue + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: d2a991bdd123448eb2be73d79f1180c4 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + grid: + enabled: true + version: '2' + visualizationUrl: local:scatter + id: product_saleability + title: Product Saleability + - content: + buckets: + - items: + - measure: + alias: Items Sold + definition: + measureDefinition: + aggregation: sum + filters: [] + item: + identifier: + id: quantity + type: fact + format: '#,##0.00' + localIdentifier: 29486504dd0e4a36a18b0b2f792d3a46 + title: Sum of Quantity + - measure: + definition: + measureDefinition: + aggregation: avg + filters: [] + item: + identifier: + id: price + type: fact + format: '#,##0.00' + localIdentifier: aa6391acccf1452f8011201aef9af492 + title: Avg Price + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_in_category + type: metric + localIdentifier: 2cd39539d8da46c9883e63caa3ba7cc0 + title: '% Revenue in Category' + - measure: + alias: Total Revenue + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 9a0f08331c094c7facf2a0b4f418de0a + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 06bc6b3b9949466494e4f594c11f1bff + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 192668bfb6a74e9ab7b5d1ce7cb68ea3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 06bc6b3b9949466494e4f594c11f1bff + direction: asc + version: '2' + visualizationUrl: local:table + id: revenue_and_quantity_by_product_and_category + title: Revenue and Quantity by Product and Category + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 7df6c34387744d69b23ec92e1a5cf543 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 4bb4fc1986c546de9ad976e6ec23fed4 + localIdentifier: trend + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 34bddcb1cd024902a82396216b0fa9d8 + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + granularity: GDC.time.year + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:line + id: revenue_by_category_trend + title: Revenue by Category Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 4ae3401bdbba4938afe983df4ba04e1c + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 1c8ba72dbfc84ddd913bf81dc355c427 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + version: '2' + visualizationUrl: local:bar + id: revenue_by_product + title: Revenue by Product + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: 13a50d811e474ac6808d8da7f4673b35 + title: Campaign Spend + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_dollar_spent + type: metric + localIdentifier: a0f15e82e6334280a44dbedc7d086e7c + title: Revenue per Dollar Spent + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: 1d9fa968bafb423eb29c938dfb1207ff + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + xaxis: + min: '0' + yaxis: + min: '0' + version: '2' + visualizationUrl: local:scatter + id: revenue_per_usd_vs_spend_by_campaign + title: Revenue per $ vs Spend by Campaign + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 60c854969a9c4c278ab596d99c222e92 + title: Revenue + localIdentifier: measures + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: c2fa7ef48cc54af99f8c280eb451e051 + title: '# of Orders' + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 413ac374b65648fa96826ca01d47bdda + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -3 + granularity: GDC.time.quarter + to: 0 + properties: + controls: + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - c2fa7ef48cc54af99f8c280eb451e051 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: revenue_trend + title: Revenue Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 3f127ccfe57a40399e23f9ae2a4ad810 + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: f4e39e24f11e4827a191c30d65c89d2c + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: state + type: label + localIdentifier: bbccd430176d428caed54c99afc9589e + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: state + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_customers + title: Top 10 Customers + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 77dc71bbac92412bac5f94284a5919df + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 781952e728204dcf923142910cc22ae2 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_products + title: Top 10 Products + - request: + method: PUT + uri: http://localhost:3000/api/v1/layout/workspaces + body: + workspaceDataFilters: + - columnName: wdf__region + id: wdf__region + title: Customer region + workspaceDataFilterSettings: + - filterValues: + - West + id: region_west + title: Region West + workspace: + id: demo_west + type: workspace + workspace: + id: demo + type: workspace + - columnName: wdf__state + id: wdf__state + title: Customer state + workspaceDataFilterSettings: + - filterValues: + - California + id: region_west_california + title: Region West California + workspace: + id: demo_west_california + type: workspace + workspace: + id: demo_west + type: workspace + workspaces: + - id: demo + name: Demo + customApplicationSettings: [] + hierarchyPermissions: + - assignee: + id: demo2 + type: user + name: MANAGE + - assignee: + id: demoGroup + type: userGroup + name: ANALYZE + model: + analytics: + analyticalDashboardExtensions: [] + analyticalDashboards: + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + header: + title: Spend breakdown and Revenue + description: The first insight shows a breakdown of + spend by category and campaign. The second shows revenue + per $ spend, for each campaign, to demonstrate, how + campaigns are successful. + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Campaign Spend + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: campaign_spend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue per $ vs Spend by Campaign + description: '' + ignoreDashboardFilters: [] + insight: + identifier: + id: revenue_per_usd_vs_spend_by_campaign + type: visualizationObject + drills: [] + properties: {} + version: '2' + id: campaign + title: Campaign + permissions: + - assigneeRule: + type: allWorkspaceUsers + name: VIEW + description: '' + - content: + filterContextRef: + identifier: + id: campaign_name_filter + type: filterContext + layout: + sections: + - items: + - size: + xl: + gridWidth: 12 + type: IDashboardLayoutItem + widget: + description: '' + drills: [] + ignoreDashboardFilters: [] + insight: + identifier: + id: top_10_products + type: visualizationObject + properties: {} + title: DHO simple + type: insight + type: IDashboardLayoutSection + type: IDashboardLayout + plugins: + - plugin: + identifier: + id: dashboard_plugin_1 + type: dashboardPlugin + version: '2' + version: '2' + id: dashboard_plugin + title: Dashboard plugin + - content: + filterContextRef: + identifier: + id: region_filter + type: filterContext + layout: + type: IDashboardLayout + sections: + - type: IDashboardLayoutSection + items: + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Top 10 Products + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: top_10_products + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Revenue Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: revenue_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Customers Trend + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: customers_trend + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Categories Pie Chart + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_categories_pie_chart + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Breakdown + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_breakdown + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 6 + widget: + type: insight + title: Product Saleability + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: product_saleability + type: visualizationObject + drills: [] + properties: {} + - type: IDashboardLayoutItem + size: + xl: + gridWidth: 12 + widget: + type: insight + title: '% Revenue per Product by Customer and Category' + description: '' + ignoreDashboardFilters: [] + dateDataSet: + identifier: + id: date + type: dataset + insight: + identifier: + id: percent_revenue_per_product_by_customer_and_category + type: visualizationObject + drills: [] + properties: {} + version: '2' + id: product_and_category + title: Product & Category + description: '' + attributeHierarchies: [] + dashboardPlugins: + - content: + url: https://www.example.com + version: '2' + id: dashboard_plugin_1 + title: dashboard_plugin_1 + description: Testing record dashboard_plugin_1 + - content: + url: https://www.example.com + version: '2' + id: dashboard_plugin_2 + title: dashboard_plugin_2 + description: Testing record dashboard_plugin_2 + filterContexts: + - content: + filters: + - dateFilter: + from: '0' + to: '0' + granularity: GDC.time.month + type: relative + - attributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 14b0807447ef4bc28f43e4fc5c337d1d + filterElementsBy: [] + version: '2' + id: campaign_name_filter + title: filterContext + description: '' + - content: + filters: + - attributeFilter: + displayForm: + identifier: + id: region + type: label + negativeSelection: true + attributeElements: + uris: [] + localIdentifier: 2d5ef8df82444f6ba27b45f0990ee6af + filterElementsBy: [] + version: '2' + id: region_filter + title: filterContext + description: '' + metrics: + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/customer_id},{attribute/order_line_id}) + id: amount_of_active_customers + title: '# of Active Customers' + - content: + format: '#,##0' + maql: SELECT COUNT({attribute/order_id}) + id: amount_of_orders + title: '# of Orders' + - content: + format: '#,##0' + maql: 'SELECT {metric/amount_of_active_customers} WHERE (SELECT + {metric/revenue} BY {attribute/customer_id}) > 10000 ' + id: amount_of_top_customers + title: '# of Top Customers' + - content: + format: '#,##0.00' + maql: SELECT {metric/amount_of_orders} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + id: amount_of_valid_orders + title: '# of Valid Orders' + description: '' + - content: + format: $#,##0 + maql: SELECT SUM({fact/spend}) + id: campaign_spend + title: Campaign Spend + - content: + format: $#,##0 + maql: SELECT SUM({fact/price}*{fact/quantity}) + id: order_amount + title: Order Amount + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / {metric/total_revenue} + id: percent_revenue + title: '% Revenue' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_customers + title: '% Revenue from Top 10 Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/customer_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_customers + title: '% Revenue from Top 10% Customers' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10_percent}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_percent_products + title: '% Revenue from Top 10% Products' + - content: + format: '#,##0.0%' + maql: "SELECT\n (SELECT {metric/revenue} WHERE (SELECT {metric/revenue_top_10}\ + \ BY {attribute/product_id}) > 0)\n /\n {metric/revenue}" + id: percent_revenue_from_top_10_products + title: '% Revenue from Top 10 Products' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY + {attribute/products.category}, ALL OTHER) + id: percent_revenue_in_category + title: '% Revenue in Category' + - content: + format: '#,##0.0%' + maql: SELECT {metric/revenue} / (SELECT {metric/revenue} BY + ALL {attribute/product_id}) + id: percent_revenue_per_product + title: '% Revenue per Product' + - content: + format: $#,##0 + maql: SELECT {metric/order_amount} WHERE NOT ({label/order_status} + IN ("Returned", "Canceled")) + id: revenue + title: Revenue + description: '' + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} + IN ("Clothing") + id: revenue-clothing + title: Revenue (Clothing) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} + IN ( "Electronics") + id: revenue-electronic + title: Revenue (Electronic) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} + IN ("Home") + id: revenue-home + title: Revenue (Home) + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE {label/products.category} + IN ("Outdoor") + id: revenue-outdoor + title: Revenue (Outdoor) + - content: + format: $#,##0.0 + maql: SELECT AVG(SELECT {metric/revenue} BY {attribute/customer_id}) + id: revenue_per_customer + title: Revenue per Customer + - content: + format: $#,##0.0 + maql: SELECT {metric/revenue} / {metric/campaign_spend} + id: revenue_per_dollar_spent + title: Revenue per Dollar Spent + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10) OF ({metric/revenue}) + id: revenue_top_10 + title: Revenue / Top 10 + - content: + format: $#,##0 + maql: SELECT {metric/revenue} WHERE TOP(10%) OF ({metric/revenue}) + id: revenue_top_10_percent + title: Revenue / Top 10% + - content: + format: $#,##0 + maql: SELECT {metric/revenue} BY ALL OTHER + id: total_revenue + title: Total Revenue + - content: + format: $#,##0 + maql: SELECT {metric/total_revenue} WITHOUT PARENT FILTER + id: total_revenue-no_filters + title: Total Revenue (No Filters) + visualizationObjects: + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: d319bcb2d8c04442a684e3b3cd063381 + title: Campaign Spend + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_channels.category + type: label + localIdentifier: 291c085e7df8420db84117ca49f59c49 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: d9dd143d647d4d148405a60ec2cf59bc + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: type + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_channels.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: campaign_spend + title: Campaign Spend + - content: + buckets: + - items: + - measure: + alias: Active Customers + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 2ba0b87b59ca41a4b1530e81a5c1d081 + title: '# of Active Customers' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_customer + type: metric + localIdentifier: ec0606894b9f4897b7beaf1550608928 + title: Revenue per Customer + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 0de7d7f08af7480aa636857a26be72b6 + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + properties: + controls: + colorMapping: + - color: + type: guid + value: '20' + id: 2ba0b87b59ca41a4b1530e81a5c1d081 + - color: + type: guid + value: '4' + id: ec0606894b9f4897b7beaf1550608928 + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - ec0606894b9f4897b7beaf1550608928 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: customers_trend + title: Customers Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_per_product + type: metric + localIdentifier: 08d8346c1ce7438994b251991c0fbf65 + title: '% Revenue per Product' + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: b2350c06688b4da9b3833ebcce65527f + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: 7a4045fd00ac44579f52406df679435f + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 6a003ffd14994237ba64c4a02c488429 + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 75ea396d0c8b48098e31dccf8b5801d3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 7a4045fd00ac44579f52406df679435f + direction: asc + version: '2' + visualizationUrl: local:table + id: percent_revenue_per_product_by_customer_and_category + title: '% Revenue per Product by Customer and Category' + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_active_customers + type: metric + localIdentifier: 1a14cdc1293c46e89a2e25d3e741d235 + title: '# of Active Customers' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: c1feca1864244ec2ace7a9b9d7fda231 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: region + type: label + localIdentifier: 530cddbd7ca04d039e73462d81ed44d5 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: region + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + properties: + controls: + legend: + position: bottom + stackMeasuresToPercent: true + version: '2' + visualizationUrl: local:area + id: percentage_of_customers_by_region + title: Percentage of Customers by Region + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 590d332ef686468b8878ae41b23341c6 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: b166c71091864312a14c7ae8ff886ffe + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: e920a50e0bbb49788df0aac53634c1cd + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:treemap + id: product_breakdown + title: Product Breakdown + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: true + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 162b857af49d45769bc12604a5c192b9 + title: '% Revenue' + format: '#,##0.00%' + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + legend: + position: bottom + version: '2' + visualizationUrl: local:donut + id: product_categories_pie_chart + title: Product Categories Pie Chart + - content: + buckets: + - items: + - measure: + alias: Previous Period + definition: + popMeasureDefinition: + measureIdentifier: c82e025fa2db4afea9a600a424591dbe + popAttribute: + identifier: + id: date.year + type: attribute + localIdentifier: c82e025fa2db4afea9a600a424591dbe_pop + - measure: + alias: This Period + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: c82e025fa2db4afea9a600a424591dbe + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: c804ef5ba7944a5a9f360c86a9e95e9a + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -11 + granularity: GDC.time.month + to: 0 + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + stackMeasures: false + xaxis: + name: + visible: false + yaxis: + name: + visible: false + version: '2' + visualizationUrl: local:column + id: product_revenue_comparison-over_previous_period + title: Product Revenue Comparison (over previous period) + - content: + buckets: + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: aeb5d51a162d4b59aba3bd6ddebcc780 + title: '# of Orders' + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 94b3edd3a73c4a48a4d13bbe9442cc98 + title: Revenue + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: d2a991bdd123448eb2be73d79f1180c4 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: + controls: + dataLabels: + visible: auto + grid: + enabled: true + version: '2' + visualizationUrl: local:scatter + id: product_saleability + title: Product Saleability + - content: + buckets: + - items: + - measure: + alias: Items Sold + definition: + measureDefinition: + aggregation: sum + filters: [] + item: + identifier: + id: quantity + type: fact + format: '#,##0.00' + localIdentifier: 29486504dd0e4a36a18b0b2f792d3a46 + title: Sum of Quantity + - measure: + definition: + measureDefinition: + aggregation: avg + filters: [] + item: + identifier: + id: price + type: fact + format: '#,##0.00' + localIdentifier: aa6391acccf1452f8011201aef9af492 + title: Avg Price + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: percent_revenue_in_category + type: metric + localIdentifier: 2cd39539d8da46c9883e63caa3ba7cc0 + title: '% Revenue in Category' + - measure: + alias: Total Revenue + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 9a0f08331c094c7facf2a0b4f418de0a + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 06bc6b3b9949466494e4f594c11f1bff + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 192668bfb6a74e9ab7b5d1ce7cb68ea3 + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: {} + sorts: + - attributeSortItem: + attributeIdentifier: 06bc6b3b9949466494e4f594c11f1bff + direction: asc + version: '2' + visualizationUrl: local:table + id: revenue_and_quantity_by_product_and_category + title: Revenue and Quantity by Product and Category + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 7df6c34387744d69b23ec92e1a5cf543 + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 4bb4fc1986c546de9ad976e6ec23fed4 + localIdentifier: trend + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: 34bddcb1cd024902a82396216b0fa9d8 + localIdentifier: segment + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + granularity: GDC.time.year + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:line + id: revenue_by_category_trend + title: Revenue by Category Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 4ae3401bdbba4938afe983df4ba04e1c + title: Revenue + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 1c8ba72dbfc84ddd913bf81dc355c427 + localIdentifier: view + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + properties: {} + version: '2' + visualizationUrl: local:bar + id: revenue_by_product + title: Revenue by Product + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: campaign_spend + type: metric + localIdentifier: 13a50d811e474ac6808d8da7f4673b35 + title: Campaign Spend + localIdentifier: measures + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_per_dollar_spent + type: metric + localIdentifier: a0f15e82e6334280a44dbedc7d086e7c + title: Revenue per Dollar Spent + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: campaign_name + type: label + localIdentifier: 1d9fa968bafb423eb29c938dfb1207ff + localIdentifier: attribute + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: campaign_name + type: label + notIn: + values: [] + properties: + controls: + xaxis: + min: '0' + yaxis: + min: '0' + version: '2' + visualizationUrl: local:scatter + id: revenue_per_usd_vs_spend_by_campaign + title: Revenue per $ vs Spend by Campaign + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: revenue + type: metric + localIdentifier: 60c854969a9c4c278ab596d99c222e92 + title: Revenue + localIdentifier: measures + - items: + - measure: + alias: Number of Orders + definition: + measureDefinition: + computeRatio: false + filters: [] + item: + identifier: + id: amount_of_orders + type: metric + localIdentifier: c2fa7ef48cc54af99f8c280eb451e051 + title: '# of Orders' + localIdentifier: secondary_measures + - items: + - attribute: + displayForm: + identifier: + id: date.month + type: label + localIdentifier: 413ac374b65648fa96826ca01d47bdda + localIdentifier: view + filters: + - relativeDateFilter: + dataSet: + identifier: + id: date + type: dataset + from: -3 + granularity: GDC.time.quarter + to: 0 + properties: + controls: + dualAxis: true + legend: + position: bottom + primaryChartType: column + secondaryChartType: line + secondary_yaxis: + measures: + - c2fa7ef48cc54af99f8c280eb451e051 + xaxis: + name: + visible: false + rotation: auto + version: '2' + visualizationUrl: local:combo2 + id: revenue_trend + title: Revenue Trend + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 3f127ccfe57a40399e23f9ae2a4ad810 + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: customer_name + type: label + localIdentifier: f4e39e24f11e4827a191c30d65c89d2c + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: state + type: label + localIdentifier: bbccd430176d428caed54c99afc9589e + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: customer_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: state + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_customers + title: Top 10 Customers + - content: + buckets: + - items: + - measure: + definition: + measureDefinition: + filters: [] + item: + identifier: + id: revenue_top_10 + type: metric + localIdentifier: 77dc71bbac92412bac5f94284a5919df + title: Revenue / Top 10 + localIdentifier: measures + - items: + - attribute: + displayForm: + identifier: + id: product_name + type: label + localIdentifier: 781952e728204dcf923142910cc22ae2 + localIdentifier: view + - items: + - attribute: + displayForm: + identifier: + id: products.category + type: label + localIdentifier: fe513cef1c6244a5ac21c5f49c56b108 + localIdentifier: stack + filters: + - negativeAttributeFilter: + displayForm: + identifier: + id: product_name + type: label + notIn: + values: [] + - negativeAttributeFilter: + displayForm: + identifier: + id: products.category + type: label + notIn: + values: [] + properties: + controls: + legend: + position: bottom + version: '2' + visualizationUrl: local:bar + id: top_10_products + title: Top 10 Products + exportDefinitions: [] + ldm: + datasets: + - grain: + - id: campaign_channel_id + type: attribute + id: campaign_channels + references: + - identifier: + id: campaigns + type: dataset + multivalue: false + sources: + - column: campaign_id + target: + id: campaign_id + type: attribute + dataType: INT + title: Campaign channels + attributes: + - id: campaign_channel_id + labels: [] + sourceColumn: campaign_channel_id + title: Campaign channel id + description: Campaign channel id + sourceColumnDataType: STRING + tags: + - Campaign channels + - id: campaign_channels.category + labels: [] + sourceColumn: category + title: Category + description: Category + sourceColumnDataType: STRING + tags: + - Campaign channels + - id: type + labels: [] + sourceColumn: type + title: Type + description: Type + sourceColumnDataType: STRING + tags: + - Campaign channels + dataSourceTableId: + dataSourceId: demo-test-ds + id: campaign_channels + type: dataSource + path: + - demo + - campaign_channels + description: Campaign channels + facts: + - id: budget + sourceColumn: budget + title: Budget + description: Budget + sourceColumnDataType: NUMERIC + tags: + - Campaign channels + - id: spend + sourceColumn: spend + title: Spend + description: Spend + sourceColumnDataType: NUMERIC + tags: + - Campaign channels + tags: + - Campaign channels + - grain: + - id: campaign_id + type: attribute + id: campaigns + references: [] + title: Campaigns + attributes: + - id: campaign_id + labels: [] + sourceColumn: campaign_id + title: Campaign id + description: Campaign id + sourceColumnDataType: INT + tags: + - Campaigns + - id: campaign_name + labels: [] + sourceColumn: campaign_name + title: Campaign name + description: Campaign name + sourceColumnDataType: STRING + tags: + - Campaigns + dataSourceTableId: + dataSourceId: demo-test-ds + id: campaigns + type: dataSource + path: + - demo + - campaigns + description: Campaigns + facts: [] + tags: + - Campaigns + - grain: + - id: customer_id + type: attribute + id: customers + references: [] + title: Customers + attributes: + - id: customer_id + labels: [] + sourceColumn: customer_id + title: Customer id + description: Customer id + sourceColumnDataType: INT + tags: + - Customers + - id: customer_name + labels: [] + sourceColumn: customer_name + title: Customer name + description: Customer name + sourceColumnDataType: STRING + tags: + - Customers + - id: region + labels: [] + sourceColumn: region + title: Region + description: Region + sourceColumnDataType: STRING + tags: + - Customers + - id: state + labels: + - id: geo__state__location + sourceColumn: geo__state__location + title: Location + description: Location + sourceColumnDataType: STRING + tags: + - Customers + sourceColumn: state + title: State + description: State + sourceColumnDataType: STRING + tags: + - Customers + dataSourceTableId: + dataSourceId: demo-test-ds + id: customers + type: dataSource + path: + - demo + - customers + description: Customers + facts: [] + tags: + - Customers + - grain: + - id: order_line_id + type: attribute + id: order_lines + references: + - identifier: + id: campaigns + type: dataset + multivalue: false + sources: + - column: campaign_id + target: + id: campaign_id + type: attribute + dataType: INT + - identifier: + id: customers + type: dataset + multivalue: false + sources: + - column: customer_id + target: + id: customer_id + type: attribute + dataType: INT + - identifier: + id: date + type: dataset + multivalue: false + sources: + - column: date + target: + id: date + type: date + dataType: DATE + - identifier: + id: products + type: dataset + multivalue: false + sources: + - column: product_id + target: + id: product_id + type: attribute + dataType: INT + title: Order lines + attributes: + - id: order_id + labels: [] + sourceColumn: order_id + title: Order id + description: Order id + sourceColumnDataType: STRING + tags: + - Order lines + - id: order_line_id + labels: [] + sourceColumn: order_line_id + title: Order line id + description: Order line id + sourceColumnDataType: STRING + tags: + - Order lines + - id: order_status + labels: [] + sourceColumn: order_status + title: Order status + description: Order status + sourceColumnDataType: STRING + tags: + - Order lines + dataSourceTableId: + dataSourceId: demo-test-ds + id: order_lines + type: dataSource + path: + - demo + - order_lines + description: Order lines + facts: + - id: price + sourceColumn: price + title: Price + description: Price + sourceColumnDataType: NUMERIC + tags: + - Order lines + - id: quantity + sourceColumn: quantity + title: Quantity + description: Quantity + sourceColumnDataType: NUMERIC + tags: + - Order lines + tags: + - Order lines + workspaceDataFilterColumns: + - dataType: STRING + name: wdf__region + - dataType: STRING + name: wdf__state + workspaceDataFilterReferences: + - filterColumn: wdf__region + filterColumnDataType: STRING + filterId: + id: wdf__region + type: workspaceDataFilter + - grain: + - id: product_id + type: attribute + id: products + references: [] + title: Products + attributes: + - id: product_id + labels: [] + sourceColumn: product_id + title: Product id + description: Product id + sourceColumnDataType: INT + tags: + - Products + - id: product_name + labels: [] + sourceColumn: product_name + title: Product name + description: Product name + sourceColumnDataType: STRING + tags: + - Products + - id: products.category + labels: [] + sourceColumn: category + title: Category + description: Category + sourceColumnDataType: STRING + tags: + - Products + dataSourceTableId: + dataSourceId: demo-test-ds + id: products + type: dataSource + path: + - demo + - products + description: Products + facts: [] + tags: + - Products + dateInstances: + - granularities: + - MINUTE + - HOUR + - DAY + - WEEK + - MONTH + - QUARTER + - YEAR + - MINUTE_OF_HOUR + - HOUR_OF_DAY + - DAY_OF_WEEK + - DAY_OF_MONTH + - DAY_OF_YEAR + - WEEK_OF_YEAR + - MONTH_OF_YEAR + - QUARTER_OF_YEAR + granularitiesFormatting: + titleBase: '' + titlePattern: '%titleBase - %granularityTitle' + id: date + title: Date + description: '' + tags: + - Date + permissions: + - assignee: + id: demo2 + type: user + name: ANALYZE + - assignee: + id: demoGroup + type: userGroup + name: VIEW + settings: [] + userDataFilters: [] + automations: [] + - id: demo_west + name: Demo West + customApplicationSettings: [] + hierarchyPermissions: [] + model: + analytics: + analyticalDashboardExtensions: + - id: campaign + permissions: + - assigneeRule: + type: allWorkspaceUsers + name: VIEW + analyticalDashboards: [] + attributeHierarchies: [] + dashboardPlugins: [] + filterContexts: [] + metrics: [] + visualizationObjects: [] + exportDefinitions: [] + ldm: + datasetExtensions: + - id: order_lines + workspaceDataFilterReferences: + - filterColumn: wdf__state + filterColumnDataType: STRING + filterId: + id: wdf__state + type: workspaceDataFilter + datasets: [] + dateInstances: [] + parent: + id: demo + type: workspace + permissions: [] + settings: [] + userDataFilters: [] + automations: [] + - id: demo_west_california + name: Demo West California + customApplicationSettings: [] + hierarchyPermissions: [] + model: + analytics: + analyticalDashboardExtensions: [] + analyticalDashboards: [] + attributeHierarchies: [] + dashboardPlugins: [] + filterContexts: [] + metrics: [] + visualizationObjects: [] + exportDefinitions: [] + ldm: + datasets: [] + dateInstances: [] + parent: + id: demo_west + type: workspace + permissions: [] + settings: [] + userDataFilters: [] + automations: [] + headers: + Accept-Encoding: + - br, gzip, deflate + Content-Type: + - application/json + X-GDC-VALIDATE-RELATIONS: + - 'true' + X-Requested-With: + - XMLHttpRequest + response: + status: + code: 204 + message: No Content + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - Content-Disposition, Content-Length, Content-Range, Set-Cookie + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Connection: + - keep-alive + Content-Security-Policy: + - 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline'' + ''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com + src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com; + img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com + cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com + *.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src + ''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src + ''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com + *.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net + matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com + *.wistia.net embedwistia-a.akamaihd.net' + DATE: *id001 + Expires: + - '0' + GoodData-Deployment: + - aio + Permission-Policy: + - geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera + 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment + 'none'; + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - nginx + Vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + X-Content-Type-Options: + - nosniff + X-GDC-TRACE-ID: *id001 + X-XSS-Protection: + - '0' + set-cookie: + - SPRING_REDIRECT_URI=; Max-Age=0; Expires=Tue, 15 Oct 2024 11:44:34 GMT; + Path=/; HTTPOnly; SameSite=Lax + body: + string: '' diff --git a/gooddata-sdk/tests/catalog/test_catalog_workspace_content.py b/gooddata-sdk/tests/catalog/test_catalog_workspace_content.py index 3256e1e5f..afd5253f3 100644 --- a/gooddata-sdk/tests/catalog/test_catalog_workspace_content.py +++ b/gooddata-sdk/tests/catalog/test_catalog_workspace_content.py @@ -10,6 +10,8 @@ from gooddata_sdk import ( CatalogDatasetWorkspaceDataFilterIdentifier, CatalogDeclarativeAnalytics, + CatalogDeclarativeExportDefinition, + CatalogDeclarativeExportDefinitionRequestPayload, CatalogDeclarativeModel, CatalogDeclarativeWorkspaceDataFilterReferences, CatalogDependentEntitiesRequest, @@ -464,3 +466,26 @@ def test_explicit_workspace_data_filter(test_config): assert len(dataset.workspace_data_filter_references) == 1 finally: _refresh_workspaces(sdk) + + +@gd_vcr.use_cassette(str(_fixtures_dir / "export_definition_analytics_layout.yaml")) +def test_export_definition_analytics_layout(test_config): + sdk = GoodDataSdk.create(host_=test_config["host"], token_=test_config["token"]) + try: + export_definition = CatalogDeclarativeExportDefinition( + id="export_definition_id", + title="export_definition_title", + request_payload=CatalogDeclarativeExportDefinitionRequestPayload(file_name="abc", format="CSV"), + ) + export_definition.to_api() + analytics_o = sdk.catalog_workspace_content.get_declarative_analytics_model( + test_config["workspace"], exclude=["ACTIVITY_INFO"] + ) + analytics_o.analytics.export_definitions = [export_definition] + sdk.catalog_workspace_content.put_declarative_analytics_model(test_config["workspace"], analytics_o) + analytics_e = sdk.catalog_workspace_content.get_declarative_analytics_model( + test_config["workspace"], exclude=["ACTIVITY_INFO"] + ) + assert analytics_o.analytics.export_definitions == analytics_e.analytics.export_definitions + finally: + _refresh_workspaces(sdk)