From fc2c398fa94f8718db2d06135799a1b2d49e3477 Mon Sep 17 00:00:00 2001 From: Abhishek Balaji Radhakrishnan Date: Mon, 9 Sep 2024 12:40:00 -0400 Subject: [PATCH 1/3] Web-console change to add Delta snapshot version. Web-console change for https://github.com/apache/druid/pull/17004. --- .../ingestion-spec/ingestion-spec.tsx | 14 ++++++++++++++ .../druid-models/input-source/input-source.tsx | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index 03898732bb00..ddff304671c2 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -1060,6 +1060,7 @@ export function getIoConfigFormFields(ingestionComboType: IngestionComboType): F name: 'inputSource.filter', label: 'Delta filter', type: 'json', + placeholder: '{"type": "=", "column": "name", "value": "foo"}', defaultValue: {}, info: ( <> @@ -1072,6 +1073,19 @@ export function getIoConfigFormFields(ingestionComboType: IngestionComboType): F ), }, + { + name: 'inputSource.snapshotVersion', + label: 'Delta snapshot version', + type: 'number', + placeholder: '2', + defaultValue: {}, + info: ( + <> + The snapshot version to read from the Delta table. By default, the latest snapshot is + read. + + ), + }, ]; case 'index_parallel:hdfs': diff --git a/web-console/src/druid-models/input-source/input-source.tsx b/web-console/src/druid-models/input-source/input-source.tsx index 4479150227d3..75ddd66d6d32 100644 --- a/web-console/src/druid-models/input-source/input-source.tsx +++ b/web-console/src/druid-models/input-source/input-source.tsx @@ -652,7 +652,7 @@ export const INPUT_SOURCE_FIELDS: Field[] = [ label: 'Delta filter', type: 'json', placeholder: '{"type": "=", "column": "name", "value": "foo"}', - defined: inputSource => inputSource.type === 'delta' && deepGet(inputSource, 'filter'), + defined: typeIsKnown(KNOWN_TYPES, 'delta'), required: false, info: ( <> @@ -663,6 +663,19 @@ export const INPUT_SOURCE_FIELDS: Field[] = [ ), }, + { + name: 'snapshotVersion', + label: 'Delta snapshot version', + type: 'number', + placeholder: '3', + defined: typeIsKnown(KNOWN_TYPES, 'delta'), + required: false, + info: ( + <> + The snapshot version to read from the Delta table. By default, the latest snapshot is read. + + ), + }, // sql { From e95200c42d4488872ecf3860fc5413050fc39477 Mon Sep 17 00:00:00 2001 From: Abhishek Radhakrishnan Date: Mon, 9 Sep 2024 14:03:34 -0400 Subject: [PATCH 2/3] Update web-console/src/druid-models/input-source/input-source.tsx --- web-console/src/druid-models/input-source/input-source.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-console/src/druid-models/input-source/input-source.tsx b/web-console/src/druid-models/input-source/input-source.tsx index 75ddd66d6d32..eb19e4575db5 100644 --- a/web-console/src/druid-models/input-source/input-source.tsx +++ b/web-console/src/druid-models/input-source/input-source.tsx @@ -667,7 +667,7 @@ export const INPUT_SOURCE_FIELDS: Field[] = [ name: 'snapshotVersion', label: 'Delta snapshot version', type: 'number', - placeholder: '3', + placeholder: '(latest)', defined: typeIsKnown(KNOWN_TYPES, 'delta'), required: false, info: ( From 7348829283f0a4acd9ecf8c1ec2532bec8d78c1e Mon Sep 17 00:00:00 2001 From: Abhishek Radhakrishnan Date: Mon, 9 Sep 2024 14:04:00 -0400 Subject: [PATCH 3/3] Update web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx --- web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index ddff304671c2..45f84c8a809c 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -1077,7 +1077,7 @@ export function getIoConfigFormFields(ingestionComboType: IngestionComboType): F name: 'inputSource.snapshotVersion', label: 'Delta snapshot version', type: 'number', - placeholder: '2', + placeholder: '(latest)', defaultValue: {}, info: ( <>