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
  • Concepts
  • Use Cases
  • Impact on Relationships
  • Create a Shared fields
  • Organize Shared fields
  1. Semantic modeling

Shared Fields

Overview

Shared Fields in ReOrc enable users to define reusable dimensions and measures that can be applied across multiple cubes and projects' cubes within the semantic layer. These standardized fields ensure consistency, improve efficiency, and provide a unified analytical experience across various datasets.

Concepts

1. Cross-Cube Calculation Enablement

  • The key purpose of Shared Fields is to enable cross-cube calculations, allowing measures to be derived from multiple cubes.

  • Example: Profit is calculated using Revenue from the Sales Cube and Cost from the Finance Cube, ensuring a standardized approach across reports and dashboards.

  • This differs from Custom Measures/Dimensions, which are specific to a single cube and already reusable when creating views.

2. Reusable Dimensions and Measures Across Projects

  • Dimensions: Common attributes (e.g., Date, Customer ID, Product Category) that can be used across different cubes and projects.

  • Measures: Aggregated calculations (e.g., Total Revenue, Order Count, Average Discount) that maintain uniform logic across datasets and projects.

3. Governance and Standardization

  • Provides a centralized approach to managing key business metrics and attributes.

  • Reduces inconsistencies caused by different teams defining the same metric differently.

Use Cases

1. Cross-Cube Profit Calculation

  • Example: Profit is calculated as Revenue (from Sales Cube) minus Cost (from Finance Cube).

  • Impact: Ensures all financial reports consistently apply the same logic without duplication.

2. Consistent Business Metrics Across Projects

  • Example: Total Sales is defined once and applied across multiple projects, ensuring uniform reporting for regional and global teams.

  • Impact: Standardizes metric calculations across different business units.

3. Cross-Functional Data Analysis

  • Example: Customer Lifetime Value (CLV) is derived from Average Order Value (from Sales Cube) and Customer Retention Rate (from Marketing Cube).

  • Impact: Enables a unified customer analytics strategy by leveraging data from different business domains.

Impact on Relationships

  • Defining Relationships for Shared Fields: Users must define relationships between the shared fields (underlying cubes used in the calculation) and the cubes included in the view.

  • Maintains Referential Integrity: Ensures accurate joins and aggregations when shared fields are used across multiple cubes.

  • Simplifies Data Lineage Tracking: Provides visibility into how dimensions and measures are connected to different views and reports.

  • Optimizes Data Processing: Reduces redundancy and enhances the efficiency of data transformation and computation.

Create a Shared fields

To create s shared fields, follow these steps:

  1. In the Cube tab, click on the + icon and select New shared dimension or New shared measure.

  2. Fill in the details in the modal and click on Create button.

  1. Fill in the details:

    1. Field label will be auto populate based on the Field name

    2. When entering the custom formula, you can click on the fields on the list to auto populate into the formula box.

    3. For Aggregations and sample use case, refer to Aggregation Function

  1. Click on Validate button to validate the formula

Ensure that the custom formula matches the type of database connected.

  1. Once no error detected, click on Add button to add the custom dimension into the cube.

Organize Shared fields

You can organize the shared into folders that reflect the analysis area and help maintain a clean project structure.

To create a new folder, click on the action button of an existing folder and select Add sub-folder:

To move a model into the new folder, click on the action button of the model and select Move to. Then select the target folder from the list.

PreviousAdd Shared FieldsNextIntegration

Last updated 15 days ago