ReOrc docs
Get ReOrc
English
English
  • About ReOrc
  • Set up and deployment
    • Set up organization
    • Install ReOrc agent
  • Getting started
    • 1. Set up a connection
      • BigQuery setup
    • 2. Create a project
    • 3. Create data models
    • 4. Build models in console
    • 5. Set up a pipeline
  • Connections
    • Destinations
      • Google Service Account
    • Integrations
      • Slack
  • Data modeling
    • Overview
    • Sources
    • Models
      • Model schema
      • Model configurations
    • Jinja templating
      • Variables
      • Macros
    • Materialization
    • Data lineage
    • Data tests
      • Built-in generic tests
      • Custom generic tests
      • Singular tests
  • Semantic modeling
    • Overview
    • Data Modelling vs Semantic Layer
    • Cube
      • Custom Dimension
      • Custom Measure
        • Aggregation Function
        • SQL functions and operators
        • Calculating Period-over-Period Changes
      • Relationship
    • View
      • Primary Dimension
      • Add Shared Fields
    • Shared Fields
    • Integration
      • Guandata Integration
      • Looker Studio
  • Pipeline
    • Overview
    • Modeling pipeline
    • Advanced pipeline
    • Job
  • Health tracking
    • Pipeline health
    • Data quality
  • Data governance
    • Data protection
  • Asset management
    • Console
    • Metadata
    • Version history
    • Packages and dependencies
  • DATA SERVICE
    • Overview
    • Create & edit Data Service
    • Data preview & download
    • Data sharing API
    • Access control
  • AI-powered
    • Rein AI Copilot
  • Settings
    • Organization settings
    • Project settings
    • Profile settings
    • Roles and permissions
  • Platform Specific
    • Doris/SelectDB
Powered by GitBook
On this page
  • Overview
  • Purpose of the Primary Dimension
  • Impact of Primary Dimension on Query Results
  • Set Primary Dimension
  1. Semantic modeling
  2. View

Primary Dimension

Overview

The Primary Dimension in ReOrc Views serves as the key identifier that defines the root Cube for the join path. It establishes a structured relationship for combining multiple data sources, ensuring accurate and efficient data retrieval.

Purpose of the Primary Dimension

  • Defines the Root Cube: Determines the starting point for joining multiple Cubes within the View.

  • Ensures Consistent Data Relationships: Helps maintain a structured and logical data flow by guiding how joins are applied across related datasets.

  • Optimizes Query Performance: Provides a predefined path for data aggregation, reducing unnecessary joins and improving efficiency.

  • Supports Business Logic: Ensures that the View aligns with reporting needs by structuring data based on the most relevant business entity.

Impact of Primary Dimension on Query Results

The choice of Primary Dimension can significantly influence the outcome of queries and reports. Below are examples of how it affects results:

Example 1: Customer-Centric vs. Order-Centric View

  • Primary Dimension: Customer ID

    • The View will group data around customers.

    • Aggregations such as total spend per customer will be calculated at the customer level.

    • A customer with multiple orders will have their data merged, displaying cumulative totals.

    • Order without customers will not be show in this scenario.

  • Primary Dimension: Order ID

    • The View will group data by individual orders.

    • Each order will be treated as a separate record, displaying order-level details.

    • Orders without customer will be available.

Example 2: Sales Data with Different Primary Dimensions

  • Primary Dimension: Product ID

    • The View will show total sales grouped by product.

    • Metrics like average revenue per product will be straightforward to compute.

  • Primary Dimension: Region ID

    • The View will aggregate sales data based on geographical regions.

    • Queries will focus on regional trends rather than product-level sales.

Set Primary Dimension

To set primary dimension for a view, mouse over to the dimension that you would like to set as the primary dimension and click on ..., select Set as primary dimension

PreviousViewNextAdd Shared Fields

Last updated 15 days ago