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 NestedColumnDialog

From Leeroopedia
Revision as of 14:15, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Apache_Druid_NestedColumnDialog.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Overview

NestedColumnDialog is a memoized React component that provides a dialog for expanding a nested (JSON) column into multiple derived columns by selecting JSON paths.

Description

The component queries the data source to discover available JSON paths within a nested column using ARRAY_CONCAT_AGG(DISTINCT, JSON_PATHS(...)), limited to the last 14 days of data for performance. Discovered paths are displayed in a searchable, checkable list where users can select individual paths or use "Select all" / "Select none" buttons. A naming scheme input (using % as a placeholder for the path) controls the output column names. On apply, the selected paths are expanded into JSON_VALUE expressions and inserted after the original nested column in the query source.

Usage

Opened from the resource pane in the Explore view when the user wants to expand a nested/complex column (e.g., a JSON column) into individual typed columns based on discovered JSON paths.

Code Reference

Source Location

Signature

export interface NestedColumnDialogProps {
  nestedColumn: SqlExpression;
  onApply(newQuery: SqlQuery): void;
  querySource: QuerySource;
  runSqlQuery(query: string | SqlQuery): Promise<QueryResult>;
  onClose(): void;
}

export const NestedColumnDialog = React.memo(
  function NestedColumnDialog(props: NestedColumnDialogProps): JSX.Element
);

Import

import { NestedColumnDialog } from './views/explore-view/components/resource-pane/nested-column-dialog/nested-column-dialog';

I/O Contract

Inputs

Name Type Required Description
nestedColumn SqlExpression Yes The SQL expression representing the nested column to expand
onApply (newQuery: SqlQuery) => void Yes Callback invoked with the modified query containing the expanded path columns
querySource QuerySource Yes The current query source for base query construction and column management
runSqlQuery (query: string or SqlQuery) => Promise<QueryResult> Yes Function to execute SQL queries for path discovery
onClose () => void Yes Callback to close the dialog

Outputs

Name Type Description
JSX.Element ReactElement A dialog with path discovery, naming scheme input, searchable path selection, and apply/cancel buttons

Usage Examples

Expand Nested JSON Column

<NestedColumnDialog
  nestedColumn={SqlExpression.parse('"event_payload"')}
  onApply={(newQuery) => updateQuerySource(newQuery)}
  querySource={querySource}
  runSqlQuery={runSqlQuery}
  onClose={() => setNestedDialogOpen(false)}
/>

Related Pages

Page Connections

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