Skip to main contentWhen setting up an object, you can mark specific attributes as Measures or Dimensions to enhance query efficiency and help Ana understand your data model better.
-
Measures - Numeric columns that contain quantitative data to be aggregated. For example,
total_revenue, order_count, average_rating
-
Dimensions - Categorical columns used to slice, filter, or group data. For example,
region_name, customer_age_group, product_category
Marking Attributes
To mark attributes as measures or dimensions:
- Click on an object to open the Object Sidebar
- Go to the “Attributes” tab
- Click the “meas” button next to an attribute to mark it as a measure
- Click the “dim” button next to an attribute to mark it as a dimension
- Changes are saved automatically
The buttons are highlighted when active.
Benefits of Defining Metrics and Dimensions
Specifying metrics and dimensions improves the performance and usability of queries by enabling faster identification of relevant data areas.
For instance, if a user asks, “Split total orders by region and plot on a map,” Ana can quickly identify:
total_orders as the measure to aggregate
region_name as the dimension to group by
When metrics and dimensions are pre-defined, query performance improves significantly, particularly for large datasets.
Best Practices for Large Datasets
For datasets with over 10 million rows, defining metrics and dimensions is strongly recommended. This approach:
- Increases the reliability of Ana
- Reduces message latency
- Allows Ana to load more data efficiently into the Python sandbox
By structuring datasets with clear metrics and dimensions, you can streamline data exploration and enhance the overall query experience.