From cd1ddcd36bda3dff1602e0676ef5b2b0ec0d39b6 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Tue, 4 May 2021 00:11:26 -0700 Subject: [PATCH] Web Console: allow pollPeriod to be defined in JDBC lookup config (#11193) * allow pollPeriod to be defined in JDBC lookup config * add test * save the whales --- web-console/src/druid-models/lookup-spec.spec.ts | 1 + web-console/src/druid-models/lookup-spec.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web-console/src/druid-models/lookup-spec.spec.ts b/web-console/src/druid-models/lookup-spec.spec.ts index 689b680a635..0d8fa03f3be 100644 --- a/web-console/src/druid-models/lookup-spec.spec.ts +++ b/web-console/src/druid-models/lookup-spec.spec.ts @@ -416,6 +416,7 @@ describe('lookup-spec', () => { table: 'some_lookup_table', keyColumn: 'the_old_dim_value', valueColumn: 'the_new_dim_value', + pollPeriod: 600000, }, }), ).toBe(false); diff --git a/web-console/src/druid-models/lookup-spec.tsx b/web-console/src/druid-models/lookup-spec.tsx index 439a81bd532..0b621faf94e 100644 --- a/web-console/src/druid-models/lookup-spec.tsx +++ b/web-console/src/druid-models/lookup-spec.tsx @@ -263,7 +263,8 @@ export const LOOKUP_FIELDS: Field[] = [ name: 'extractionNamespace.pollPeriod', type: 'string', defaultValue: '0', - defined: (model: LookupSpec) => deepGet(model, 'extractionNamespace.type') === 'uri', + defined: (model: LookupSpec) => + oneOf(deepGet(model, 'extractionNamespace.type'), 'uri', 'jdbc'), info: `Period between polling for updates`, },