Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Apache Druid RecordTableModule

From Leeroopedia


Knowledge Sources
Domains Web_Console, Data_Exploration
Last Updated 2026-02-10 10:00 GMT

Overview

RecordTableModule is an Explore view module that registers with ModuleRepository to display raw query records in a paginated table with configurable row limits and column visibility.

Description

The module registers under the id record-table with parameters for maxRows (default 200), ascending sort order, type icon visibility, and an option to hide all-null columns. Its component builds a SELECT * query from the query source with the current WHERE and module-specific WHERE clauses applied, respecting the configured row limit. When a __time column exists and ascending is false, results are ordered by __time DESC; otherwise the original query ordering is preserved. Results are rendered using GenericOutputTable with timezone support, column hints for hiding null columns, and interactive WHERE clause editing.

Usage

Used as a pluggable module in the Explore view's module layout system. It provides the basic record-level data browsing experience, showing individual rows from the current query source with applied filters.

Code Reference

Source Location

Signature

interface RecordTableParameterValues {
  maxRows: number;
  ascending: boolean;
  showTypeIcons: boolean;
  hideNullColumns: boolean;
}

ModuleRepository.registerModule<RecordTableParameterValues>({
  id: 'record-table',
  title: 'Record table',
  icon: IconNames.TH,
  parameters: { maxRows, ascending, showTypeIcons, hideNullColumns },
  component: function RecordTableModule(props): JSX.Element,
});

Import

import './views/explore-view/modules/record-table-module/record-table-module';

I/O Contract

Inputs

Name Type Required Description
stage { height: number } Yes The module stage dimensions used to calculate initial page size
querySource QuerySource Yes The current query source providing the base query for record retrieval
timezone Timezone Yes The timezone for formatting time-based column values
where SqlExpression Yes The global WHERE clause expression
setWhere (where: SqlExpression) => void Yes Callback to update the global WHERE clause from table interactions
moduleWhere SqlExpression Yes Module-specific WHERE clause applied in addition to the global filter
parameterValues RecordTableParameterValues Yes The module parameter values (maxRows, ascending, showTypeIcons, hideNullColumns)
runSqlQuery (query: string or SqlQuery, signal?: AbortSignal) => Promise<QueryResult> Yes Function to execute SQL queries for fetching records

Outputs

Name Type Description
JSX.Element ReactElement A paginated record table with loading indicator and error display

Usage Examples

Module Registration (Side Effect)

// The module self-registers when imported
import './views/explore-view/modules/record-table-module/record-table-module';

// It is then available via ModuleRepository for the Explore view layout system
const module = ModuleRepository.getModule('record-table');

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment