Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,6 @@ exports[`LookupEditDialog matches snapshot 1`] = `
"name": "extractionNamespace.pollPeriod",
"type": "string",
},
Object {
"defined": [Function],
"info": <React.Fragment>
<p>
The namespace value in the SQL query:
</p>
<p>
SELECT keyColumn, valueColumn, tsColumn? FROM
<strong>
namespace
</strong>
.table WHERE filter
</p>
</React.Fragment>,
"name": "extractionNamespace.namespace",
"placeholder": "some_lookup",
"required": true,
"type": "string",
},
Object {
"defined": [Function],
"info": "Defines the connectURI value on the The connector config to used",
Expand Down
32 changes: 2 additions & 30 deletions web-console/src/druid-models/lookup-spec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,36 +235,12 @@ describe('lookup-spec', () => {
});

describe('ExtractionNamespace type JDBC', () => {
it('No namespace', () => {
expect(
isLookupInvalid('lookup', 'v1', '__default', {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: undefined,
connectorConfig: {
createTables: true,
connectURI: 'jdbc:mysql://localhost:3306/druid',
user: 'druid',
password: 'diurd',
},
table: 'some_lookup_table',
keyColumn: 'the_old_dim_value',
valueColumn: 'the_new_dim_value',
tsColumn: 'timestamp_column',
pollPeriod: 600000,
},
}),
).toBe(true);
});

it('No connectorConfig', () => {
expect(
isLookupInvalid('lookup', 'v1', '__default', {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: 'some_lookup',
connectorConfig: undefined,
table: 'some_lookup_table',
keyColumn: 'the_old_dim_value',
Expand All @@ -282,7 +258,6 @@ describe('lookup-spec', () => {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: 'some_lookup',
connectorConfig: {
createTables: true,
connectURI: 'jdbc:mysql://localhost:3306/druid',
Expand All @@ -305,7 +280,6 @@ describe('lookup-spec', () => {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: 'some_lookup',
connectorConfig: {
createTables: true,
connectURI: 'jdbc:mysql://localhost:3306/druid',
Expand All @@ -322,13 +296,12 @@ describe('lookup-spec', () => {
).toBe(true);
});

it('No keyColumn', () => {
it('No valueColumn', () => {
expect(
isLookupInvalid('lookup', 'v1', '__default', {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: 'some_lookup',
connectorConfig: {
createTables: true,
connectURI: 'jdbc:mysql://localhost:3306/druid',
Expand Down Expand Up @@ -428,13 +401,12 @@ describe('lookup-spec', () => {
});

describe('ExtractionNamespace type JDBC', () => {
it('No namespace', () => {
it('All good', () => {
expect(
isLookupInvalid('lookup', 'v1', '__default', {
type: 'cachedNamespace',
extractionNamespace: {
type: 'jdbc',
namespace: 'lookup',
connectorConfig: {
createTables: true,
connectURI: 'jdbc:mysql://localhost:3306/druid',
Expand Down
17 changes: 0 additions & 17 deletions web-console/src/druid-models/lookup-spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export interface ExtractionNamespaceSpec {
uriPrefix?: string;
fileRegex?: string;
namespaceParseSpec?: NamespaceParseSpec;
namespace?: string;
connectorConfig?: {
createTables: boolean;
connectURI: string;
Expand Down Expand Up @@ -268,22 +267,6 @@ export const LOOKUP_FIELDS: Field<LookupSpec>[] = [
},

// JDBC stuff
{
name: 'extractionNamespace.namespace',
type: 'string',
placeholder: 'some_lookup',
defined: (model: LookupSpec) => deepGet(model, 'extractionNamespace.type') === 'jdbc',
required: true,
info: (
<>
<p>The namespace value in the SQL query:</p>
<p>
SELECT keyColumn, valueColumn, tsColumn? FROM <strong>namespace</strong>.table WHERE
filter
</p>
</>
),
},
{
name: 'extractionNamespace.connectorConfig.connectURI',
label: 'Connect URI',
Expand Down