@dataform/core 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bundle.js +1 -1
  2. package/core.proto +312 -0
  3. package/package.json +2 -2
package/bundle.js CHANGED
@@ -23742,7 +23742,7 @@ class RefReplacingContext {
23742
23742
  }
23743
23743
  }
23744
23744
 
23745
- const version = "2.0.2";
23745
+ const version = "2.0.4";
23746
23746
 
23747
23747
  const SQL_DATA_WAREHOUSE_DIST_HASH_REGEXP = new RegExp("HASH\\s*\\(\\s*\\w*\\s*\\)\\s*");
23748
23748
  const DEFAULT_CONFIG = {
package/core.proto ADDED
@@ -0,0 +1,312 @@
1
+ syntax="proto3";
2
+
3
+ package dataform;
4
+
5
+ option java_package = "com.dataform.protos";
6
+ option java_outer_classname = "CoreMeta";
7
+ option java_multiple_files = true;
8
+
9
+ option go_package = "github.com/dataform-co/dataform/protos/dataform";
10
+
11
+ message ProjectConfig {
12
+ string warehouse = 1;
13
+
14
+ string default_database = 9;
15
+ string default_schema = 2;
16
+ string default_location = 16;
17
+
18
+ string assertion_schema = 5;
19
+
20
+ map<string, string> vars = 14;
21
+
22
+ int32 concurrent_query_limit = 13;
23
+ int32 idempotent_action_retries = 8;
24
+
25
+ string database_suffix = 15;
26
+ string schema_suffix = 7;
27
+ string table_prefix = 11;
28
+
29
+
30
+ // Deprecated.
31
+ // Please use 'default_database' instead.
32
+ string gcloud_project_id = 6;
33
+ // This setting no longer has any effect.
34
+ bool use_run_cache = 10;
35
+
36
+ reserved 3, 4, 12;
37
+ }
38
+
39
+ message GenerateIndexConfig {
40
+ CompileConfig compile_config = 1;
41
+ repeated string include_paths = 2;
42
+ repeated string definition_paths = 3;
43
+
44
+ reserved 4;
45
+ }
46
+
47
+ message CompileConfig {
48
+ // Required.
49
+ string project_dir = 1;
50
+
51
+ // A list of all files in the project directory.
52
+ repeated string file_paths = 8;
53
+
54
+ // Project configuration overrides (dataform.json).
55
+ ProjectConfig project_config_override = 3;
56
+
57
+ // Override compilation timeout settings.
58
+ int32 timeout_millis = 6;
59
+
60
+ // Whether to use the new main function instead of gen index.
61
+ bool use_main = 9;
62
+
63
+ reserved 2, 4, 5, 7;
64
+ }
65
+
66
+ message Target {
67
+ string database = 3;
68
+ string schema = 1;
69
+ string name = 2;
70
+ }
71
+
72
+ message BigQueryOptions {
73
+ string partition_by = 1;
74
+ repeated string cluster_by = 2;
75
+ string update_partition_filter = 3;
76
+ map<string, string> labels = 4;
77
+ int32 partition_expiration_days = 5;
78
+ bool require_partition_filter = 6;
79
+ map<string, string> additional_options = 7;
80
+ }
81
+
82
+ message RedshiftOptions {
83
+ string dist_key = 1;
84
+ string dist_style = 2;
85
+ repeated string sort_keys = 3;
86
+ string sort_style = 4;
87
+
88
+ bool bind = 5 [deprecated = true];
89
+ }
90
+
91
+ message SnowflakeOptions {
92
+ bool secure = 1;
93
+ bool transient = 2;
94
+ repeated string cluster_by = 3;
95
+ }
96
+
97
+ message SQLDataWarehouseOptions {
98
+ string distribution = 1;
99
+ }
100
+
101
+ message PrestoOptions {
102
+ repeated string partition_by = 3;
103
+ }
104
+
105
+ message GraphErrors {
106
+ repeated CompilationError compilation_errors = 1;
107
+
108
+ reserved 2;
109
+ }
110
+
111
+ message CompilationError {
112
+ string file_name = 1;
113
+ // TODO: Deprecate this and replace with action_target.
114
+ string action_name = 4;
115
+ Target action_target = 5;
116
+ string message = 2;
117
+ string stack = 3;
118
+ }
119
+
120
+ message ActionDescriptor {
121
+ string description = 1;
122
+ // For Operations, 'columns' may be set iff has_output == true.
123
+ // For Assertions, 'columns' will always be empty.
124
+ repeated ColumnDescriptor columns = 2;
125
+ map<string, string> bigquery_labels = 3;
126
+ }
127
+
128
+ message ColumnDescriptor {
129
+ string description = 1;
130
+
131
+ // For nested records, the path might look like e.g. ["record", "column"].
132
+ // For simple columns, this will always contain a single entry e.g. ["column"].
133
+ repeated string path = 2;
134
+
135
+ string display_name = 3;
136
+
137
+ enum DimensionType {
138
+ UNKNOWN_DIMENSION = 0;
139
+ CATEGORY = 1;
140
+ TIMESTAMP = 2;
141
+ NUMBER = 3;
142
+ }
143
+ DimensionType dimension_type = 4;
144
+
145
+ enum Aggregation {
146
+ UNKNOWN_AGGREGATION = 0;
147
+ SUM = 1;
148
+ DISTINCT = 2;
149
+ DERIVED = 3;
150
+ }
151
+ Aggregation aggregation = 5;
152
+
153
+ string expression = 6;
154
+
155
+ repeated string tags = 7;
156
+
157
+ // BigQuery specific settings.
158
+
159
+ repeated string bigquery_policy_tags = 8;
160
+ }
161
+
162
+ message Table {
163
+ Target target = 4;
164
+ Target canonical_target = 32;
165
+
166
+ repeated Target dependency_targets = 27;
167
+ ActionHermeticity hermeticity = 31;
168
+
169
+ bool disabled = 6;
170
+
171
+ string type = 3;
172
+ string query = 5;
173
+ bool protected = 9;
174
+ bool materialized = 35;
175
+
176
+ ActionDescriptor action_descriptor = 24;
177
+
178
+ repeated string tags = 23;
179
+
180
+ // Incremental only.
181
+ string where = 8 [deprecated = true];
182
+ string incremental_query = 26;
183
+ repeated string unique_key = 30;
184
+
185
+ // Pre/post operations.
186
+ repeated string pre_ops = 13;
187
+ repeated string post_ops = 14;
188
+ repeated string incremental_pre_ops = 28;
189
+ repeated string incremental_post_ops = 29;
190
+
191
+ // Warehouse specific features.
192
+ RedshiftOptions redshift = 21;
193
+ BigQueryOptions bigquery = 22;
194
+ SnowflakeOptions snowflake = 33;
195
+ SQLDataWarehouseOptions sql_data_warehouse = 25;
196
+ PrestoOptions presto = 34;
197
+
198
+ // Generated.
199
+ string file_name = 18;
200
+
201
+ reserved 1,2, 7, 12, 16;
202
+ }
203
+
204
+ message Operation {
205
+ Target target = 3;
206
+ Target canonical_target = 13;
207
+ repeated Target dependency_targets = 11;
208
+
209
+ ActionHermeticity hermeticity = 12;
210
+
211
+ bool disabled = 14;
212
+
213
+ repeated string queries = 6;
214
+ bool has_output = 8;
215
+ repeated string tags = 9;
216
+
217
+ ActionDescriptor action_descriptor = 10;
218
+
219
+ // Generated.
220
+ string file_name = 7;
221
+
222
+ reserved 1, 2, 4, 5;
223
+ }
224
+
225
+ message Assertion {
226
+ Target target = 8;
227
+ Target canonical_target = 13;
228
+
229
+ repeated Target dependency_targets = 11;
230
+ ActionHermeticity hermeticity = 12;
231
+
232
+ bool disabled = 14;
233
+
234
+ string query = 3;
235
+
236
+ repeated string tags = 9;
237
+
238
+ ActionDescriptor action_descriptor = 10;
239
+
240
+ // Only present for auto assertions.
241
+ Target parent_action = 15;
242
+
243
+ // Generated.
244
+ string file_name = 7;
245
+
246
+ reserved 1, 2, 4, 5, 6;
247
+ }
248
+
249
+ enum ActionHermeticity {
250
+ UNKNOWN = 0;
251
+ HERMETIC = 1;
252
+ NON_HERMETIC = 2;
253
+ }
254
+
255
+ message Declaration {
256
+
257
+ Target target = 2;
258
+ Target canonical_target = 5;
259
+
260
+ ActionDescriptor action_descriptor = 3;
261
+
262
+ // Generated.
263
+ string file_name = 4;
264
+ }
265
+
266
+ message Test {
267
+ string name = 1;
268
+
269
+ string test_query = 2;
270
+ string expected_output_query = 3;
271
+
272
+ // Generated.
273
+ string file_name = 4;
274
+ }
275
+
276
+ message CompiledGraph {
277
+ ProjectConfig project_config = 4;
278
+
279
+ repeated Table tables = 1;
280
+ repeated Operation operations = 2;
281
+ repeated Assertion assertions = 3;
282
+ repeated Declaration declarations = 9;
283
+ repeated Test tests = 8;
284
+
285
+ GraphErrors graph_errors = 7;
286
+
287
+ string dataform_core_version = 10;
288
+
289
+ repeated Target targets = 11;
290
+
291
+ reserved 5, 6;
292
+ }
293
+
294
+ message CoreExecutionRequest {
295
+ oneof request {
296
+ CompileExecutionRequest compile = 1;
297
+ }
298
+ }
299
+
300
+ message CoreExecutionResponse {
301
+ oneof response {
302
+ CompileExecutionResponse compile = 1;
303
+ }
304
+ }
305
+
306
+ message CompileExecutionRequest {
307
+ CompileConfig compile_config = 1;
308
+ }
309
+
310
+ message CompileExecutionResponse {
311
+ CompiledGraph compiled_graph = 1;
312
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "dependencies": {
3
3
  "protobufjs": "^7.0.0",
4
4
  "tarjan-graph": "^2.0.0",
5
- "semver": "^7.1.2",
5
+ "semver": "^7.3.8",
6
6
  "moo": "^0.5.0",
7
7
  "long": "^4.0.0"
8
8
  },
@@ -50,7 +50,7 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "version": "2.0.2",
53
+ "version": "2.0.4",
54
54
  "name": "@dataform/core",
55
55
  "description": "Dataform core API.",
56
56
  "main": "bundle.js",