Maintaining consistency in how metrics are defined and consumed across an organization is challenging. Fully ad-hoc data analysis is great for exploration but loses the consistency that growing organizations need for a ‘single source of truth’.
Zing Data’s latest feature - a robust semantic layer - addresses this challenge head-on by providing a centralized way to define, manage, and govern metrics easily. And most importantly, its optional unlike many other BI tools…so you can add the structure when you need it.
A semantic layer acts as a translation layer between your raw data and business definitions. It provides a business-friendly interface to your data warehouse, allowing you to define metrics, relationships, and access controls in a single place. Think of it as your organization’s single source of truth for metric definitions.
While Zing already offers capabilities to define metrics examples, create aliases, and define join relationships, a semantic layer goes beyond this to allow you to specify:
We’ve taken a straightforward approach to semantic layer implementation, offering a JSON-based configuration that makes it easy to define your metrics and their relationships.
We heard from many users that although there are multiple semantic models that exist out in the market (such as dbt), they can complex and require additional software. We’ve made it simple to define calculations, enforce relationships, and bring consistency and governance to your data users.
Importantly, Zing does not require you to have a data model to work, and a semantic model can be added later as your organization’s needs for consistency in metrics, guardrails, and governance increase.
A data model is defined at the data source level.
You can choose which tables/views, columns, and metrics are used to answer questions by defining a model. This allows you to put guardrails on natural language questions that users may ask within Zing, and ensures data users have a consistent, governed experience.
Specifying tables/views and columns is not required. If no tables/views are specified in your modeling layer, then by default, all tables/views within data source will be made available to answer questions.If no columns are specified, then all columns within a given table/view will be made available.
Metrics are defined by a:
A sample data model file for Zing is shown below:
{
"tables": [
{
"name": "Orders",
"columns": [
{
"name": "OrderID",
"description": "Unique identifier for the order"
},
{
"name": "CustomerID",
"description": "Unique identifier for the customer"
},
{
"name": "Item_Amount",
"description": "Total revenue excluding taxes of all items in the order"
},
{
"name": "Tax_Amount",
"description": "Tax amount paid on the order"
},
{
"name": "Total_Amount",
"description": "Total order amount including tax"
}
]
},
{
"name": "Customers",
"columns": [
{
"name": "CustomerID",
"description": "Unique identifier for the customer"
},
{
"name": "Name",
"description": "Name of the customer"
},
{
"name": "City",
"description": "City of the customer"
},
{
"name": "State",
"description": "State of the customer"
}
]
}
],
"metrics": [
{
"description": "Tax_Percentage",
"expr": "sum(Tax_Amount)/sum(Item_Amount)",
"groupBy": {
"allowed": [
"City",
"State"
],
"required": [],
"forbidden":[]
}
},
{
"description": "Order_Amount",
"expr": "sum(Total_Amount)",
"groupBy": {
"allowed": [
],
"required": [],
"forbidden": ["CustomerID", "Name"]
}
}
]
}
This would ensure that:
Order amount can’t be shown by Customer Name or Customer ID
Tax rate is only shown at a City or State level
Only the Orders and Customers tables/views are available to answer questions, and only with the specific columns outlined.
The modeling layer functionality is available on the Pro Plan and Enterprise Plan!
Available on iOS, Android, and the web
Learn how Zing can help you and your organization collaborate with data
Schedule Demo