Skip to content

Commit 1868d37

Browse files
author
Elias Kassell
authored
Bump dataprep proto to latest config (#1825)
* Bump dataprep proto to latest config * Remove license header
1 parent 674b1e6 commit 1868d37

1 file changed

Lines changed: 43 additions & 10 deletions

File tree

protos/data_preparation.proto

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,44 @@ syntax = "proto3";
33
package dataform.dataprep;
44

55
option java_package = "com.dataform.dataprep.protos";
6+
option java_outer_classname = "DataPreparationMeta";
67
option java_multiple_files = true;
7-
88
option go_package = "github.com/dataform-co/dataform/protos/dataform/dataprep";
99

1010
message DataPreparation {
1111
repeated DataPreparationNode nodes = 1;
1212
DataPreparationGenerated generated = 2;
13-
DataPreparationConfiguration configuration = 3;
13+
optional DataPreparationConfiguration configuration = 3;
1414
}
1515

1616
message DataPreparationNode {
1717
string id = 1;
1818
Source source = 2;
1919
repeated Step steps = 3;
2020
NodeGenerated generated = 4;
21-
Destination destination = 5;
21+
optional Destination destination = 5;
2222
}
2323

2424
message DataPreparationConfiguration {
25-
TableReference error_table = 1;
25+
optional TableReference error_table = 1;
26+
optional int32 error_table_data_expiration_days = 2;
27+
optional LoadConfiguration load = 3;
28+
optional DefaultsConfiguration defaults = 4;
29+
}
30+
31+
message LoadConfiguration {
32+
oneof mode {
33+
SimpleLoadMode replace = 1;
34+
SimpleLoadMode append = 2;
35+
IncrementalLoadMode maximum = 3;
36+
IncrementalLoadMode unique = 4;
37+
}
38+
}
39+
40+
message SimpleLoadMode {}
41+
42+
message IncrementalLoadMode {
43+
string column_name = 1;
2644
}
2745

2846
message Source {
@@ -42,11 +60,13 @@ message Destination {
4260
message Step {
4361
string id = 1;
4462
string description = 2;
45-
4663
oneof definition {
4764
ColumnStep column_step = 3;
4865
FilterStep filter_step = 4;
66+
DropColumnsStep drop_columns_step = 6;
67+
KeepColumnsStep keep_columns_step = 7;
4968
}
69+
5070
StepGenerated generated = 5;
5171
}
5272

@@ -66,6 +86,14 @@ message FilterStep {
6686
optional FilterType filter_type = 2;
6787
}
6888

89+
message DropColumnsStep {
90+
repeated string columns = 1;
91+
}
92+
93+
message KeepColumnsStep {
94+
repeated string columns = 1;
95+
}
96+
6997
message Expression {
7098
oneof expression {
7199
string sql = 1;
@@ -118,9 +146,9 @@ message NodeGenerated {
118146
repeated Section sections = 1;
119147
repeated string sources = 2;
120148
repeated ValidationError validation_errors = 3;
121-
Schema output_schema = 4;
149+
optional Schema output_schema = 4;
122150
SourceGenerated source_generated = 5;
123-
DestinationGenerated destination_generated = 6;
151+
optional DestinationGenerated destination_generated = 6;
124152
}
125153

126154
message Section {
@@ -138,7 +166,7 @@ enum SectionType {
138166
}
139167

140168
message SourceGenerated {
141-
SourceSchema source_schema = 4;
169+
optional SourceSchema source_schema = 4;
142170
}
143171

144172
message SourceSchema {
@@ -155,7 +183,7 @@ message JoinSchema {
155183
}
156184

157185
message DestinationGenerated {
158-
Schema schema = 1;
186+
optional Schema schema = 1;
159187
}
160188

161189
message StepGenerated {
@@ -184,4 +212,9 @@ enum ValidationErrorLevel {
184212
LEVEL_WARN = 1;
185213
LEVEL_ERROR = 2;
186214
LEVEL_FATAL = 3;
187-
}
215+
}
216+
217+
message DefaultsConfiguration {
218+
string project = 1;
219+
string dataset = 2;
220+
}

0 commit comments

Comments
 (0)