-
Notifications
You must be signed in to change notification settings - Fork 8
/
destination_sdk.proto
134 lines (114 loc) · 2.95 KB
/
destination_sdk.proto
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
syntax = "proto3";
option optimize_for = SPEED;
option java_multiple_files = true;
option go_package = "fivetran.com/fivetran_sdk";
package fivetran_sdk;
import "google/protobuf/timestamp.proto";
import "common.proto";
// Fivetran (grpc client) <> Destination (grpc server)
service Destination {
rpc ConfigurationForm (ConfigurationFormRequest) returns (ConfigurationFormResponse) {}
rpc Capabilities (CapabilitiesRequest) returns (CapabilitiesResponse) {}
rpc Test (TestRequest) returns (TestResponse) {}
rpc DescribeTable (DescribeTableRequest) returns (DescribeTableResponse) {}
rpc CreateTable(CreateTableRequest) returns (CreateTableResponse) {}
rpc AlterTable(AlterTableRequest) returns (AlterTableResponse) {}
rpc Truncate(TruncateRequest) returns (TruncateResponse) {}
rpc WriteBatch (WriteBatchRequest) returns (WriteBatchResponse) {}
}
message CapabilitiesRequest {}
message CapabilitiesResponse {
BatchFileFormat batch_file_format = 1;
}
message DescribeTableRequest {
map<string, string> configuration = 1;
string schema_name = 2;
string table_name = 3;
}
message DescribeTableResponse {
oneof response {
bool not_found = 1;
string failure = 2;
Table table = 3;
}
}
message CreateTableRequest {
map<string, string> configuration = 1;
string schema_name = 2;
Table table = 3;
}
message CreateTableResponse {
oneof response {
bool success = 1;
string failure = 2;
}
}
message AlterTableRequest {
map<string, string> configuration = 1;
string schema_name = 2;
Table table = 3;
}
message AlterTableResponse {
oneof response {
bool success = 1;
string failure = 2;
}
}
message TruncateRequest {
map<string, string> configuration = 1;
string schema_name = 2;
string table_name = 3;
string synced_column = 4;
google.protobuf.Timestamp utc_delete_before = 5;
optional SoftTruncate soft = 6;
}
message SoftTruncate {
string deleted_column = 3;
}
message TruncateResponse {
oneof response {
bool success = 1;
string failure = 2;
}
}
message WriteBatchRequest {
map<string, string> configuration = 1;
string schema_name = 2;
Table table = 3;
map<string, bytes> keys = 4;
repeated string replace_files = 5;
repeated string update_files = 6;
repeated string delete_files = 7;
oneof file_params {
CsvFileParams csv = 8;
ParquetFileParams parquet = 9;
}
}
message CsvFileParams {
Compression compression = 1;
Encryption encryption = 2;
string null_string = 3;
string unmodified_string = 4;
}
message ParquetFileParams {
Encryption encryption = 1;
}
enum Encryption {
NONE = 0;
AES = 1;
}
enum BatchFileFormat {
CSV = 0;
PARQUET = 1;
}
enum Compression {
OFF = 0;
ZSTD = 1;
GZIP = 2;
}
message WriteBatchResponse {
oneof response {
bool success = 1;
string failure = 2;
}
}