Glossary

Lookup Table

A lookup table stores reference data using key-value retrieval, functioning as a data repository that business rules can query for product information, pricing matrices, or configuration values. DecisionRules provides lookup tables as structured data stores where each row is uniquely identified by a primary key, enabling fast retrieval during rule execution without conditional logic evaluation.

What Is a Lookup Table and How Does It Differ From a Decision Table?

Lookup tables and decision tables serve fundamentally different purposes. Decision tables evaluate conditions to determine outcomes—given input values, they match conditions and return corresponding results. Lookup tables simply retrieve data by key—given an identifier, they return associated values without conditional evaluation.

Consider the difference between asking "what discount applies for this customer type and order amount?" (decision table) versus "what is the product name for SKU ABC123?" (lookup table). The first requires condition matching; the second requires key-based retrieval.

DecisionRules implements lookup tables as reference data repositories where primary keys uniquely identify rows, and multiple columns store associated attributes. Rules query lookup tables to retrieve values during execution—looking up product details, regional settings, or configuration parameters without embedding this reference data within decision logic.

Resources:

What Use Cases Benefit Most From Lookup Tables?

Lookup tables excel when rules need reference data that changes independently of decision logic. Product catalogs, pricing matrices, geographic configurations, and customer segment definitions represent classic lookup table content—data that rules query but don't evaluate as conditions.

Separation of reference data from decision logic provides maintenance benefits. When product prices change, analysts update the lookup table without touching the pricing rules that consume that data. When new products launch, adding lookup table rows requires no rule modifications.

DecisionRules lookup tables support diverse use cases including product catalog lookups by SKU or product code, pricing retrieval by product ID or tier, customer attribute lookups by customer ID, geographic settings by country or postal code, and application configuration by setting name.

Resources:

How Do Decision Tables Query Lookup Tables During Execution?

The power of lookup tables emerges when combined with decision tables in orchestrated workflows. Decision tables can query lookup tables to retrieve values that then participate in conditional evaluation or output calculation.

A pricing decision table might first lookup the base price for a product SKU, then apply discount rules based on customer tier and order quantity, then lookup regional tax rates, and finally calculate the total price. The decision logic remains in the decision table while reference data lives in lookup tables.

DecisionRules enables this integration through built-in lookup functions accessible from decision tables, decision trees, and decision flows. Queries use primary key matching for fast retrieval, with results available as variables for subsequent rule logic.

Resources:

Key Takeaways: Lookup Table

Lookup tables store reference data using key-value retrieval, providing fast data access without conditional evaluation. DecisionRules lookup tables serve as repositories for product catalogs, pricing matrices, geographic configurations, and other reference data that decision rules query during execution. This separation enables independent maintenance of reference data and decision logic, with support for CSV, XLSX, and JSON import.


Frequently Asked Questions About Lookup Table

How large can lookup tables be?

DecisionRules lookup tables support large reference datasets optimized for fast key-based retrieval. The primary key structure ensures consistent performance regardless of table size.

How do I import data into lookup tables?

DecisionRules supports importing lookup table data from CSV, XLSX, and JSON files. The import process maps file columns to table columns, enabling bulk loading of reference data from existing sources.

Can lookup tables return multiple columns?

Yes, lookup table queries retrieve all columns for matching rows. A single lookup can return product name, description, price, category, and any other attributes stored with that primary key.

When should I use a lookup table instead of hardcoding values in rules?

Use lookup tables for reference data that changes independently of rule logic, needs to be managed by different teams, or exceeds a few values. Hardcoding is appropriate only for truly static values that define the rule logic itself.

Related Business Terms and Concepts

Decision Table Decision tables evaluate conditions to determine outcomes, while lookup tables retrieve data by key. Decision tables often query lookup tables to incorporate reference data into conditional logic.

Decision Flow

Decision Flow is a versatile tool designed to orchestrate decision-making processes by integrating various business rules, performing data transformations, running inline scripts, calling external APIs and more. It can also make conditional decisions and perform different actions based on different satisfied conditions, which makes it a powerful addition to the platform. With the workflow feature on board, DecisionRules can now be used not only as a business rule management engine, but also as a workflow engine.

Dynamic Pricing

Dynamic pricing implementations commonly use lookup tables for base prices, product attributes, and regional configurations while decision tables apply pricing logic based on retrieved values.

Business Rules Engine

Business rules engines provide the platform for both lookup tables and decision rules. DecisionRules supports lookup tables as integrated reference data stores accessible from all rule types.