-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcopy_ingest_processor.ts
60 lines (58 loc) · 1.15 KB
/
copy_ingest_processor.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import { PROCESSOR_TYPE } from '../../../common';
import { generateId } from '../../utils';
import { Processor } from '../processor';
/**
* The copy ingest processor
*/
export class CopyIngestProcessor extends Processor {
constructor() {
super();
this.name = 'Copy Processor';
this.type = PROCESSOR_TYPE.COPY;
this.id = generateId('copy_processor_ingest');
this.fields = [
{
id: 'source_field',
type: 'string',
},
{
id: 'target_field',
type: 'string',
},
];
this.optionalFields = [
{
id: 'ignore_missing',
type: 'boolean',
value: false,
},
{
id: 'override_target',
type: 'boolean',
value: false,
},
{
id: 'remove_source',
type: 'boolean',
value: false,
},
{
id: 'ignore_failure',
type: 'boolean',
value: false,
},
{
id: 'description',
type: 'textArea',
},
{
id: 'tag',
type: 'string',
},
];
}
}