Article body
Full article
This HENGSHI SENSE 7.0 feature preview looks at automatic modeling, which lets analysts build charts across tables using relationships that the data team has defined once.
Automatic modeling uses shared dimensions to describe business relationships. The platform derives the relationships needed for each query, so analysts can focus on selecting data and answering business questions.
Cross-table analysis is part of everyday work. An analyst might break down order value by product category, compare sales by store region, or look at how revenue varies across customer industries. Even with the data already connected, chart building can require choosing a primary table, joining related tables, configuring join conditions, and verifying what a one-to-many relationship means. A change in the analytical question can mean revisiting that model.
With automatic modeling in HENGSHI SENSE 7.0, data teams maintain entity identifiers, field mappings, and key roles in shared dimensions. Analysts choose the datasets, dimensions, measures, and filters they need. The platform derives the relationship path for that query, reducing repeated setup across similar use cases. The VIP merchandising example below shows how this works.
Part 01 · How automatic modeling works
From shared dimensions to a cross-table query
The process has four stages: shared dimensions → relationship graph → query-scoped virtual model → SQL execution. The data team defines business relationships in advance. The platform uses them to work out how to connect the data that a chart needs.

Shared dimensions define how business entities connect
A shared dimension maps the fields that represent the same business entity in different datasets and records the role of each field, such as a unique key or a reference key. A product ID uniquely identifies a record in the product catalog, for example, while the same ID in an order line references that product. These mappings let the platform infer join conditions and cardinality.
Composite keys are also supported. If customer IDs are unique within each tenant, for instance, use the tenant ID and customer ID together. The platform matches the fields in the configured order so records from different tenants remain distinct.
Relationship planning follows what the chart uses
The platform identifies the datasets that provide the requested dimensions, measures, and filters, then builds a relationship graph from the shared dimensions. Each dataset is a node, and a configured mapping connects nodes.
Within a connected graph, the planner prioritizes the path from the reference key to the unique key and selects the joins needed for the request. Datasets used only for filtering still participate in planning.
Execution uses a virtual model scoped to the query
The planner passes the join conditions and cardinalities to a temporary relationship model. The existing SQL pipeline applies filters, grouping, and aggregation. The model serves the current request and is computed again when the requested fields, filters, or shared dimensions change.
One shared set of business relationships can support many perspectives. Business and data teams still need to validate the data and agree on how to calculate their metrics.
Part 02 · Worked example: Prepare the data
Which product categories matter most to VIP members?
Before a membership campaign, an e-commerce operations team wants to find the categories that account for most VIP order value. The answer can inform assortment planning, member benefits, and inventory discussions.
The analysis needs three datasets: orders for order amounts, products for categories, and users for membership tiers.

The example uses sample data from orders.csv, products.csv, and users.csv.
Step 1 · Create an automatic modeling data package
Choose Automatic Modeling when creating the data package, then add the datasets. The modeling mode is set at creation. An existing package keeps its current mode.

Figure 1. The automatic modeling option in the new data package dialog.
Part 03 · Worked example: Define the relationships
Step 2 · Configure shared dimensions
Map orders to products using the product ID and orders to users using the user ID. Before you configure the mappings, check that the fields represent the same business entities and follow the same coding rules.


Figure 2. The product dataset provides the unique key, and the orders dataset provides the reference key.
Key roles describe the data. Verify that each declared unique key is actually unique and that the mapped values, field types, and levels of detail are compatible.
Part 04 · Worked example: Apply the VIP filter and build the chart
Step 3 · Select the fields and measure
Choose the automatic modeling data package as the chart source. Its available base datasets appear in the dataset list. Select the fields from their respective datasets.
- Group by category. Add
categoryfrom products as the dimension. - Sum order amounts. Add
total_amountfrom orders as the measure and choose Sum. - Filter to VIP members. Add
user_levelfrom users as a filter and select the VIP tier.
The platform joins products to orders through the product ID and users to orders through the user ID. The dimension, measure, and filter therefore come from three different datasets.

Figure 3. The chart editor shows each field and its source.
The operations team can reuse these shared dimensions to compare sales across membership tiers. The data team maintains the mappings once for similar analyses.
Metric definition. The example sums sample order amounts without filtering by order status or deducting refunds. For production analysis, define the date range, eligible order statuses, and how refunds are treated.
Part 05 · Worked example: Read the results
Compare VIP spending across product categories

Figure 4. With the VIP filter applied, the chart displays order amounts by product category using all three datasets.

Figure 5. Switch to a table to check the returned amounts. The units follow the source data definition.

The four categories total 16,693. Mobile phones and digital products account for about 69% of that amount. This gives the operations team a direction to investigate for its next VIP campaign.
Before acting on the result, compare order counts, margins, refunds, and inventory. A few high-value orders could explain the concentration of spending.
Part 06 · Where to start
Maintain the relationships once and reuse them across analyses
In the example, the analyst chose a category, an order amount, and a membership filter. The system joined three datasets using the shared dimensions. When the analytical question changes, the mappings for entities such as products and users remain available for reuse.
Teams with consistent product, customer, or store identifiers can begin with frequent cross-table analyses such as member spending by category, revenue by customer industry, or sales by store region. Existing manually modeled data packages can remain in use as teams adopt automatic modeling elsewhere.
Give the planner reliable relationships
- Use consistent entity identifiers. Each mapping should refer to the same business entity, with directly comparable field values.
- Check key roles and granularity. Verify that unique and reference keys reflect the data. For measures at different granularities, check how aggregation should work to avoid double-counting.
- Check that the datasets are connected. Shared dimensions without modeling key roles do not participate in automatic joins. A result assembled from disconnected datasets should not be interpreted as evidence of a business relationship.
To see how automatic modeling fits your data, bring a cross-table question to the HENGSHI team. We can start with the entities involved and the metric you need to calculate.