Skip to content

Commit 8bf72c0

Browse files
Add extra_properties struct to metadata (#2055)
* add custom_attributes struct to metadata & incremental table tests * fix incremental table tests & add view & table test * change custom_attributes to extra_properties
1 parent 85c09b3 commit 8bf72c0

5 files changed

Lines changed: 40 additions & 4 deletions

File tree

core/actions/incremental_table_test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ actions:
104104
onSchemaChange: "SYNCHRONIZE",
105105
metadata: {
106106
overview: "incremental table overview",
107+
extraProperties: {
108+
fields: {
109+
priority: { stringValue: "high" }
110+
}
111+
}
107112
},
108113
}
109114
`;
@@ -186,8 +191,13 @@ SELECT 1`
186191
key: "val"
187192
},
188193
metadata: {
189-
overview: "incremental table overview"
190-
}
194+
overview: "incremental table overview",
195+
extraProperties: {
196+
fields: {
197+
priority: { stringValue: "high" }
198+
}
199+
}
200+
},
191201
}
192202
}
193203
]);

core/actions/table_test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ actions:
9292
hermetic: true,
9393
metadata: {
9494
overview: "table overview",
95+
extraProperties: {
96+
fields: {
97+
priority: { stringValue: "high" }
98+
}
99+
}
95100
}
96101
}`;
97102

@@ -169,7 +174,12 @@ SELECT 1`
169174
key: "val"
170175
},
171176
metadata: {
172-
overview: "table overview"
177+
overview: "table overview",
178+
extraProperties: {
179+
fields: {
180+
priority: { stringValue: "high" }
181+
}
182+
}
173183
}
174184
}
175185
}

core/actions/view_test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ actions:
9090
${exampleBuiltInAssertions.inputAssertionBlock}
9191
metadata: {
9292
overview: "view overview",
93+
extraProperties: {
94+
fields: {
95+
priority: { stringValue: "high" }
96+
}
97+
}
9398
},
9499
}`;
95100
[
@@ -164,7 +169,12 @@ SELECT 1`
164169
key: "val"
165170
},
166171
metadata: {
167-
overview: "view overview"
172+
overview: "view overview",
173+
extraProperties: {
174+
fields: {
175+
priority: { stringValue: "high" }
176+
}
177+
}
168178
},
169179
},
170180
materialized: true

protos/configs.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ option java_multiple_files = true;
88

99
option go_package = "github.com/dataform-co/dataform/protos/dataform";
1010

11+
import "google/protobuf/struct.proto";
12+
1113
// Workflow Settings defines the contents of the `workflow_settings.yaml`
1214
// configuration file.
1315
message WorkflowSettings {
@@ -266,6 +268,8 @@ message ActionConfig {
266268
message Metadata {
267269
// A detailed description of the data object.
268270
string overview = 1;
271+
// Extra properties of the data object.
272+
google.protobuf.Struct extra_properties = 2;
269273
}
270274

271275
message ViewConfig {

protos/core.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ syntax = "proto3";
33
package dataform;
44

55
import "protos/configs.proto";
6+
import "google/protobuf/struct.proto";
67

78
option java_package = "com.dataform.protos";
89
option java_outer_classname = "CoreMeta";
@@ -110,6 +111,7 @@ message ActionDescriptor {
110111

111112
message Metadata {
112113
string overview = 1;
114+
google.protobuf.Struct extra_properties = 2;
113115
}
114116

115117
message ColumnDescriptor {

0 commit comments

Comments
 (0)