Skip to content

Commit

Permalink
Web console changes for #16288 (#16379)
Browse files Browse the repository at this point in the history
Adds a text box for delta filter that can accept an optional json
object.
  • Loading branch information
abhishekrb19 authored May 2, 2024
1 parent 39ada8b commit 3717554
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
21 changes: 21 additions & 0 deletions web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,27 @@ export function getIoConfigFormFields(ingestionComboType: IngestionComboType): F
type: 'string',
placeholder: '/path/to/deltaTable',
required: true,
info: (
<>
<p>A full path to the Delta Lake table.</p>
</>
),
},
{
name: 'inputSource.filter',
label: 'Delta filter',
type: 'json',
defaultValue: {},
info: (
<>
<ExternalLink
href={`${getLink('DOCS')}/ingestion/input-sources/#delta-filter-object`}
>
filter
</ExternalLink>
<p>A Delta filter json object to filter Delta Lake scan files.</p>
</>
),
},
];

Expand Down
24 changes: 23 additions & 1 deletion web-console/src/druid-models/input-source/input-source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export type InputSourceDesc =
}
| {
type: 'delta';
tablePath?: string;
tablePath: string;
filter?: string;
}
| {
type: 'sql';
Expand Down Expand Up @@ -624,6 +625,27 @@ export const INPUT_SOURCE_FIELDS: Field<InputSource>[] = [
placeholder: '/path/to/deltaTable',
defined: typeIsKnown(KNOWN_TYPES, 'delta'),
required: true,
info: (
<>
<p>A full path to the Delta Lake table.</p>
</>
),
},
{
name: 'filter',
label: 'Delta filter',
type: 'json',
placeholder: '{"type": "=", "column": "name", "value": "foo"}',
defined: inputSource => inputSource.type === 'delta' && deepGet(inputSource, 'filter'),
required: false,
info: (
<>
<ExternalLink href={`${getLink('DOCS')}/ingestion/input-sources/#delta-filter-object`}>
filter
</ExternalLink>
<p>A Delta filter json object to filter Delta Lake scan files.</p>
</>
),
},

// sql
Expand Down

0 comments on commit 3717554

Please sign in to comment.