/
connector.go
96 lines (94 loc) · 2.14 KB
/
connector.go
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package athena
import (
"github.com/kubemq-hub/builder/connector/common"
)
func Connector() *common.Connector {
return common.NewConnector().
SetKind("aws.athena").
SetDescription("AWS Athena Target").
SetName("Athena").
SetProvider("AWS").
SetCategory("Analytics").
SetTags("query", "s3", "SQL").
AddProperty(
common.NewProperty().
SetKind("string").
SetName("aws_key").
SetDescription("Set Athena aws key").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("aws_secret_key").
SetDescription("Set Athena aws secret key").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("region").
SetDescription("Set Athena aws region").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("token").
SetDescription("Set Athena aws token").
SetMust(false).
SetDefault(""),
).
AddMetadata(
common.NewMetadata().
SetName("method").
SetKind("string").
SetDescription("Set Athena execution method").
SetOptions([]string{"list_databases", "list_data_catalogs", "query", "get_query_result"}).
SetDefault("query").
SetMust(true),
).
AddMetadata(
common.NewMetadata().
SetName("query").
SetKind("string").
SetDescription("Set Athena query").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("catalog").
SetKind("string").
SetDescription("Set Athena catalog").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("db").
SetKind("string").
SetDescription("Set Athena db").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("output_location").
SetKind("string").
SetDescription("Set Athena output location").
SetDefault("").
SetMust(false),
).
AddMetadata(
common.NewMetadata().
SetName("execution_id").
SetKind("string").
SetDescription("Set Athena execution id").
SetDefault("").
SetMust(false),
)
}