Lumi Docs
  • About Lumi AI
  • Setting Up
    • Quick Start
    • 1. Connect
    • 2. Configure
      • Configuration Tips
      • Add Tables & Fields
      • Add Business Context
      • Advanced Configuration
    • 3. Distribute
  • Using Lumi
    • Getting Started
    • Lumi Use Cases
      • Data Exploration
      • Business Metrics
      • Anomaly Detection
      • Trend Analysis
      • Root Cause Analysis
      • Data Quality
    • Best Practices
      • Prompting Best Practices
      • Boards Best Practices
      • Versioning Best Practices
    • Chat Limitations
    • Knowledge Base Utility
      • Curated Prompts
      • Leveraging Memories
    • Network Configuration
  • Product Features
    • Chat
    • Boards
    • Knowledge Base
      • Overview
      • Connection
      • Tables
        • Custom Fields
      • Model
      • Business Context
      • Memories
      • Users
      • Restoration
    • Organization Settings
      • Organization Profile
      • Tool Integrations
      • Gateway Management
      • Members
    • User Profile
    • Notifications
    • Data Gateway
      • Deployment
      • Configuring for Boot
    • Source System Integrations
      • PostgreSQL
      • Microsoft SQL Server
      • MySQL
      • Databricks
      • BigQuery
      • Snowflake
      • SAP HANA
      • Oracle
      • AWS Athena (Pre-release)
    • Secondary Interfaces
      • Slack
      • Microsoft Teams
    • Release Notes
Powered by GitBook
On this page
  • When to Use Custom Fields?
  • Create a Custom Field
  • Identify the Source Name of the Field
  • Add a Custom Field
  • Select Custom Field
  • Input SQL Calculation into Custom Calculation Field
  • Validate Custom Calculation Field

Was this helpful?

  1. Product Features
  2. Knowledge Base
  3. Tables

Custom Fields

Custom fields allow admins and contributors to expand the data model by creating fields from existing source columns.

Creating custom fields can provide flexibility and adaptability for specific business calculations. Custom fields allow for new fields to be created to expand on the data fields provided.

Example: Custom fields are great for calculations. See below for a simple calculation.
[custom_field] sales_amount = units_sold * price_per_unit

When to Use Custom Fields?

Use custom fields when you need to add a field that does not exist in the source schema, but would be beneficial to have in the semantic layer to streamline insight generation.

Key Points To Note

  • Use the SQL dialect that matches your connected data source when defining logic in the "Custom Calculation" box.

  • In the calculation, only use the source name of the field from the db.table.

  • Custom fields requiring joins to another table cannot be created.

Create a Custom Field

Let's walkthrough an example of how to use custom fields to convert the format of a "YYYY-MM-DD" date field into a fiscal-year-week field.

actual_payment_date  --> fiscal_year_week
   '2024-02-01'      -->  '2024-05'

Identify the Source Name of the Field

Use the source name for each of the fields involved in the custom calculation.

Note: it is only possible to use the source name of the field in the db.table in the actual calculation

Add a Custom Field

To add a custom field, edit the knowledge base and add a field.

Select Custom Field

Select the custom field to open the creation menu.

Input SQL Calculation into Custom Calculation Field

Use the source name for each of the fields involved in the custom calculation. Make sure to use the correct SQL dialect that matches the data source you connected.

to_char(actual_payment_date, 'IYYY-IW')

Add a semantic name and context for the field and press done.

Validate Custom Calculation Field

The custom field is now available to be used in generating insights.

PreviousTablesNextModel

Last updated 9 months ago

Was this helpful?