Skip to main content

Overview

Dimensions are attributes that describe your entities. They’re used for grouping, filtering, and segmenting data (like order status, customer name, or product category). Dimensions provide the descriptive context for your data and enable slicing and dicing your metrics.

Dimension Types

Oxygen supports five dimension types:

Dimension Properties

Examples

String Dimensions

Number Dimensions

Date Dimensions

DateTime Dimensions

Boolean Dimensions

Computed Dimensions

Use SQL expressions to create derived dimensions:

Using Synonyms

Synonyms help AI agents understand natural language queries. Add common alternative names for your dimensions:
This allows queries like:
  • “What’s the total sales this month?”
  • “Show me income by region”
  • “List all orders by purchase date

Sample Values

Provide sample values to help users and AI agents understand the dimension’s possible values:

Best Practices

Naming

  • Use descriptive names without prefixes (e.g., order_date not dim_order_date)
  • Be consistent with naming conventions across views
  • Use business terminology rather than technical names

Documentation

  • Always provide clear descriptions
  • Include samples for categorical dimensions
  • Add synonyms for dimensions commonly referenced with different terms
  • Document any special logic in computed dimensions

Expression Design

  • Keep expressions simple when possible
  • Use NULLIF to handle division by zero
  • Consider database-specific SQL syntax
  • Test complex expressions thoroughly

Type Selection

  • Use the most specific type (e.g., date instead of string for dates)
  • Be consistent with types across related dimensions
  • Match the underlying database column type

Common Patterns

Time-Based Dimensions

Geographic Dimensions

Customer Segmentation

Views

Learn about creating views

Measures

Define measures and metrics

Entities

Define entities and relationships

Overview

Back to semantic model overview