@databricks/sdk-features 0.0.0-dev → 0.1.0-dev.1
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.
- package/LICENSE +203 -0
- package/dist/v1/client.d.ts +78 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +674 -0
- package/dist/v1/client.js.map +1 -0
- package/dist/v1/index.d.ts +5 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +5 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/model.d.ts +1141 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +2253 -0
- package/dist/v1/model.js.map +1 -0
- package/dist/v1/transport.d.ts +5 -0
- package/dist/v1/transport.d.ts.map +1 -0
- package/dist/v1/transport.js +57 -0
- package/dist/v1/transport.js.map +1 -0
- package/dist/v1/utils.d.ts +22 -0
- package/dist/v1/utils.d.ts.map +1 -0
- package/dist/v1/utils.js +113 -0
- package/dist/v1/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v1/client.ts +874 -0
- package/src/v1/index.ts +105 -0
- package/src/v1/model.ts +3530 -0
- package/src/v1/transport.ts +73 -0
- package/src/v1/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
package/src/v1/model.ts
ADDED
|
@@ -0,0 +1,3530 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import {Temporal} from '@js-temporal/polyfill';
|
|
4
|
+
import {FieldMask} from '@databricks/sdk-core/wkt';
|
|
5
|
+
import type {FieldMaskSchema} from '@databricks/sdk-core/wkt';
|
|
6
|
+
import {z} from 'zod';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Scalar data types for request-time field definitions.
|
|
10
|
+
* Only flat (non-nested) types are supported.
|
|
11
|
+
*/
|
|
12
|
+
export enum ScalarDataType {
|
|
13
|
+
SCALAR_DATA_TYPE_UNSPECIFIED = 'SCALAR_DATA_TYPE_UNSPECIFIED',
|
|
14
|
+
INTEGER = 'INTEGER',
|
|
15
|
+
FLOAT = 'FLOAT',
|
|
16
|
+
BOOLEAN = 'BOOLEAN',
|
|
17
|
+
STRING = 'STRING',
|
|
18
|
+
DOUBLE = 'DOUBLE',
|
|
19
|
+
LONG = 'LONG',
|
|
20
|
+
TIMESTAMP = 'TIMESTAMP',
|
|
21
|
+
DATE = 'DATE',
|
|
22
|
+
SHORT = 'SHORT',
|
|
23
|
+
BINARY = 'BINARY',
|
|
24
|
+
DECIMAL = 'DECIMAL',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Deprecated: Use the function-specific messages in AggregationFunction.function_type oneof instead. Kept for backwards compatibility. */
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
29
|
+
export enum Function_FunctionType {
|
|
30
|
+
FUNCTION_TYPE_UNSPECIFIED = 'FUNCTION_TYPE_UNSPECIFIED',
|
|
31
|
+
AVG = 'AVG',
|
|
32
|
+
COUNT = 'COUNT',
|
|
33
|
+
SUM = 'SUM',
|
|
34
|
+
MIN = 'MIN',
|
|
35
|
+
MAX = 'MAX',
|
|
36
|
+
FIRST = 'FIRST',
|
|
37
|
+
LAST = 'LAST',
|
|
38
|
+
APPROX_COUNT_DISTINCT = 'APPROX_COUNT_DISTINCT',
|
|
39
|
+
APPROX_PERCENTILE = 'APPROX_PERCENTILE',
|
|
40
|
+
STDDEV_POP = 'STDDEV_POP',
|
|
41
|
+
STDDEV_SAMP = 'STDDEV_SAMP',
|
|
42
|
+
VAR_POP = 'VAR_POP',
|
|
43
|
+
VAR_SAMP = 'VAR_SAMP',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
47
|
+
export enum MaterializedFeature_PipelineScheduleState {
|
|
48
|
+
/** Default value, not used. */
|
|
49
|
+
PIPELINE_SCHEDULE_STATE_UNSPECIFIED = 'PIPELINE_SCHEDULE_STATE_UNSPECIFIED',
|
|
50
|
+
/** Pipeline was configured to run once then stop. */
|
|
51
|
+
SNAPSHOT = 'SNAPSHOT',
|
|
52
|
+
/** Pipeline is actively running and computing features. */
|
|
53
|
+
ACTIVE = 'ACTIVE',
|
|
54
|
+
/** Pipeline is paused and not computing features. */
|
|
55
|
+
PAUSED = 'PAUSED',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
59
|
+
export enum StreamingMode_StreamingModeType {
|
|
60
|
+
/** Default value, not used. */
|
|
61
|
+
STREAMING_MODE_TYPE_UNSPECIFIED = 'STREAMING_MODE_TYPE_UNSPECIFIED',
|
|
62
|
+
/**
|
|
63
|
+
* Real-time mode. Ultra-low-latency trigger intended for operational workloads
|
|
64
|
+
* that need responses in milliseconds or sub-second latency.
|
|
65
|
+
*/
|
|
66
|
+
STREAMING_MODE_TYPE_RTM = 'STREAMING_MODE_TYPE_RTM',
|
|
67
|
+
/**
|
|
68
|
+
* Micro-batch mode in Structured Streaming. Better suited for ETL and analytics
|
|
69
|
+
* workloads where latency is measured in seconds or minutes and cost efficiency
|
|
70
|
+
* matters more.
|
|
71
|
+
*/
|
|
72
|
+
STREAMING_MODE_TYPE_MBM = 'STREAMING_MODE_TYPE_MBM',
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** An aggregation function applied over a time window. */
|
|
76
|
+
export interface AggregationFunction {
|
|
77
|
+
/** The type of the aggregation function. */
|
|
78
|
+
operation?:
|
|
79
|
+
| {$case: 'avg'; avg: AvgFunction}
|
|
80
|
+
| {$case: 'countFunction'; countFunction: CountFunction}
|
|
81
|
+
| {$case: 'sum'; sum: SumFunction}
|
|
82
|
+
| {$case: 'min'; min: MinFunction}
|
|
83
|
+
| {$case: 'max'; max: MaxFunction}
|
|
84
|
+
| {$case: 'first'; first: FirstFunction}
|
|
85
|
+
| {$case: 'last'; last: LastFunction}
|
|
86
|
+
| {
|
|
87
|
+
$case: 'approxCountDistinct';
|
|
88
|
+
approxCountDistinct: ApproxCountDistinctFunction;
|
|
89
|
+
}
|
|
90
|
+
| {$case: 'approxPercentile'; approxPercentile: ApproxPercentileFunction}
|
|
91
|
+
| {$case: 'stddevPop'; stddevPop: StddevPopFunction}
|
|
92
|
+
| {$case: 'stddevSamp'; stddevSamp: StddevSampFunction}
|
|
93
|
+
| {$case: 'varPop'; varPop: VarPopFunction}
|
|
94
|
+
| {$case: 'varSamp'; varSamp: VarSampFunction}
|
|
95
|
+
| undefined;
|
|
96
|
+
/** The time window over which the aggregation is computed. */
|
|
97
|
+
timeWindow?: TimeWindow | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Computes the approximate count of distinct values. */
|
|
101
|
+
export interface ApproxCountDistinctFunction {
|
|
102
|
+
/** The input column from which the approximate count of distinct values is computed. */
|
|
103
|
+
input?: string | undefined;
|
|
104
|
+
/** The maximum relative standard deviation allowed (default defined by Spark). */
|
|
105
|
+
relativeSd?: number | undefined;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Computes the approximate percentile of values. */
|
|
109
|
+
export interface ApproxPercentileFunction {
|
|
110
|
+
/** The input column from which the approximate percentile is computed. */
|
|
111
|
+
input?: string | undefined;
|
|
112
|
+
/** The percentile value to compute (between 0 and 1). */
|
|
113
|
+
percentile?: number | undefined;
|
|
114
|
+
/** The accuracy parameter (higher is more accurate but slower). */
|
|
115
|
+
accuracy?: bigint | undefined;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface AuthConfig {
|
|
119
|
+
authConfig?:
|
|
120
|
+
| {
|
|
121
|
+
$case: 'ucServiceCredentialName';
|
|
122
|
+
/** Name of the Unity Catalog service credential. This value will be set under the option databricks.serviceCredential */
|
|
123
|
+
ucServiceCredentialName: string;
|
|
124
|
+
}
|
|
125
|
+
| {
|
|
126
|
+
$case: 'mtlsConfig';
|
|
127
|
+
/** Mutual-TLS authentication. See MtlsConfig. */
|
|
128
|
+
mtlsConfig: MtlsConfig;
|
|
129
|
+
}
|
|
130
|
+
| undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Computes the average of values. */
|
|
134
|
+
export interface AvgFunction {
|
|
135
|
+
/**
|
|
136
|
+
* The input column from which the average is computed. For Kafka sources, use dot-prefixed path
|
|
137
|
+
* notation (e.g., "value.amount"). For nested fields, the leaf node name is used.
|
|
138
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:amount") is supported for backwards
|
|
139
|
+
* compatibility but is deprecated; migrate to dot notation.
|
|
140
|
+
*/
|
|
141
|
+
input?: string | undefined;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface BackfillSource {
|
|
145
|
+
backfillSource?:
|
|
146
|
+
| {
|
|
147
|
+
$case: 'deltaTableSource';
|
|
148
|
+
/**
|
|
149
|
+
* Deprecated: Use delta_table_name instead. Kept for backwards compatibility.
|
|
150
|
+
* The Delta table source containing the historical data to backfill.
|
|
151
|
+
* Only the delta table name is used for backfill, other fields are ignored.
|
|
152
|
+
*/
|
|
153
|
+
deltaTableSource: DeltaTableSource;
|
|
154
|
+
}
|
|
155
|
+
| {
|
|
156
|
+
$case: 'deltaTableName';
|
|
157
|
+
/** The full three-part name (catalog, schema, name) of the Delta table containing the historical data to backfill. */
|
|
158
|
+
deltaTableName: string;
|
|
159
|
+
}
|
|
160
|
+
| undefined;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface BatchCreateMaterializedFeaturesRequest {
|
|
164
|
+
/** The requests to create materialized features. */
|
|
165
|
+
requests?: CreateMaterializedFeatureRequest[] | undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface BatchCreateMaterializedFeaturesResponse {
|
|
169
|
+
/** The created materialized features with assigned IDs. */
|
|
170
|
+
materializedFeatures?: MaterializedFeature[] | undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface ColumnIdentifier {
|
|
174
|
+
/**
|
|
175
|
+
* String representation of the column name using dot-prefixed path notation. For nested fields, the leaf value is what will be present in materialized tables
|
|
176
|
+
* and expected to match at query time. For example, the leaf node of value.trip_details.location_details.pickup_zip is pickup_zip.
|
|
177
|
+
*/
|
|
178
|
+
variantExprPath?: string | undefined;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** A ColumnSelection function, equivalent to the LAST() record of an entity over a lifetime ContinuousWindow */
|
|
182
|
+
export interface ColumnSelection {
|
|
183
|
+
/** Column name from source to select as the feature value. */
|
|
184
|
+
column?: string | undefined;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** Deprecated: use RollingWindow with `delay` instead. */
|
|
188
|
+
export interface ContinuousWindow {
|
|
189
|
+
/** The duration of the continuous window (must be positive). */
|
|
190
|
+
windowDuration?: Temporal.Duration | undefined;
|
|
191
|
+
/** The offset of the continuous window (must be non-positive). */
|
|
192
|
+
offset?: Temporal.Duration | undefined;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Computes the count of values. */
|
|
196
|
+
export interface CountFunction {
|
|
197
|
+
/**
|
|
198
|
+
* The input column from which the count is computed. For Kafka sources, use dot-prefixed path
|
|
199
|
+
* notation (e.g., "value.amount"). For nested fields, the leaf node name is used.
|
|
200
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:amount") is supported for backwards
|
|
201
|
+
* compatibility but is deprecated; migrate to dot notation.
|
|
202
|
+
*/
|
|
203
|
+
input?: string | undefined;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface CreateFeatureRequest {
|
|
207
|
+
/** Feature to create. */
|
|
208
|
+
feature?: Feature | undefined;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface CreateKafkaConfigRequest {
|
|
212
|
+
kafkaConfig?: KafkaConfig | undefined;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface CreateMaterializedFeatureRequest {
|
|
216
|
+
/** The materialized feature to create. */
|
|
217
|
+
materializedFeature?: MaterializedFeature | undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** Create a Stream, a governed UC entity representing an external streaming data source. */
|
|
221
|
+
export interface CreateStreamRequest {
|
|
222
|
+
/** The Stream to create. */
|
|
223
|
+
stream?: Stream | undefined;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** A cron-based schedule trigger for the materialization pipeline. */
|
|
227
|
+
export interface CronSchedule {
|
|
228
|
+
/** The cron expression defining the schedule (e.g., "0 0 * * *" for daily at midnight). */
|
|
229
|
+
cronExpression?: string | undefined;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Specifies the data source backing a feature. Exactly one source type must be set. */
|
|
233
|
+
export interface DataSource {
|
|
234
|
+
dataSource?:
|
|
235
|
+
| {
|
|
236
|
+
$case: 'deltaTableSource';
|
|
237
|
+
/** A Delta table data source. */
|
|
238
|
+
deltaTableSource: DeltaTableSource;
|
|
239
|
+
}
|
|
240
|
+
| {
|
|
241
|
+
$case: 'kafkaSource';
|
|
242
|
+
/** A Kafka stream data source. */
|
|
243
|
+
kafkaSource: KafkaSource;
|
|
244
|
+
}
|
|
245
|
+
| {
|
|
246
|
+
$case: 'requestSource';
|
|
247
|
+
/** A request-time data source. */
|
|
248
|
+
requestSource: RequestSource;
|
|
249
|
+
}
|
|
250
|
+
| undefined;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface DeleteFeatureRequest {
|
|
254
|
+
/** Name of the feature to delete. */
|
|
255
|
+
fullName?: string | undefined;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface DeleteKafkaConfigRequest {
|
|
259
|
+
/** Name of the Kafka config to delete. */
|
|
260
|
+
name?: string | undefined;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface DeleteMaterializedFeatureRequest {
|
|
264
|
+
/** The ID of the materialized feature to delete. */
|
|
265
|
+
materializedFeatureId?: string | undefined;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** Delete a Stream by its full three-part name (catalog.schema.stream). */
|
|
269
|
+
export interface DeleteStreamRequest {
|
|
270
|
+
/** Full three-part name (catalog.schema.stream) of the Stream to delete. */
|
|
271
|
+
name?: string | undefined;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface DeltaTableSource {
|
|
275
|
+
/** The full three-part (catalog, schema, table) name of the Delta table. */
|
|
276
|
+
fullName?: string | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* Deprecated: Use Feature.entity instead. Kept for backwards compatibility.
|
|
279
|
+
* The entity columns of the Delta table.
|
|
280
|
+
*/
|
|
281
|
+
entityColumns?: string[] | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* Deprecated: Use Feature.timeseries_column instead. Kept for backwards compatibility.
|
|
284
|
+
* The timeseries column of the Delta table.
|
|
285
|
+
*/
|
|
286
|
+
timeseriesColumn?: string | undefined;
|
|
287
|
+
/** Single WHERE clause to filter delta table before applying transformations. Will be row-wise evaluated, so should only include conditionals and projections. */
|
|
288
|
+
filterCondition?: string | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* A single SQL SELECT expression applied after filter_condition.
|
|
291
|
+
* Should contains all the columns needed (eg. "SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a > 0" would have `transformation_sql` "*, col_a + col_b AS col_c")
|
|
292
|
+
* If transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe.
|
|
293
|
+
*/
|
|
294
|
+
transformationSql?: string | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* Schema of the resulting dataframe after transformations, in Spark StructType JSON format (from df.schema.json()).
|
|
297
|
+
* Required if transformation_sql is specified.
|
|
298
|
+
* Example: {"type":"struct","fields":[{"name":"col_a","type":"integer","nullable":true,"metadata":{}},{"name":"col_c","type":"integer","nullable":true,"metadata":{}}]}
|
|
299
|
+
*/
|
|
300
|
+
dataframeSchema?: string | undefined;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Direct connection configs for mTLS, as Kafka Connections do not support mTLS yet (XTA-18030).
|
|
305
|
+
* Temporarily used until UC Kafka Connections gain mTLS support.
|
|
306
|
+
*/
|
|
307
|
+
export interface DirectMtlsConfig {
|
|
308
|
+
/** A comma-separated list of host:port pairs for the Kafka bootstrap servers. */
|
|
309
|
+
bootstrapServers?: string | undefined;
|
|
310
|
+
/** Mutual-TLS authentication configuration. */
|
|
311
|
+
mtlsConfig?: MtlsConfig | undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Schema definitions provided directly on the Stream, as opposed to referencing a schema registry.
|
|
316
|
+
* In a future milestone, we will support schema registries through a UC Connection.
|
|
317
|
+
*/
|
|
318
|
+
export interface DirectSchemas {
|
|
319
|
+
/**
|
|
320
|
+
* Schema for the message payload. For Kafka, this is the value schema.
|
|
321
|
+
* Unless the platform supports another schema (e.g. keys for Kafka), this must be specified.
|
|
322
|
+
*/
|
|
323
|
+
payloadSchema?: SchemaConfig | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* Schema for the message key. This is only used for Kafka streams.
|
|
326
|
+
* For Kafka, at least one of payload_schema or key_schema must be specified.
|
|
327
|
+
*/
|
|
328
|
+
keySchema?: SchemaConfig | undefined;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface EntityColumn {
|
|
332
|
+
/**
|
|
333
|
+
* The name of the entity column. For Kafka sources, use dot-prefixed path notation to reference
|
|
334
|
+
* fields within the key or value schema (e.g., "value.user_id", "key.partition_key"). For nested
|
|
335
|
+
* fields, the leaf node name (e.g., "user_id" from "value.trip_details.user_id") is what will
|
|
336
|
+
* be present in materialized tables and expected to match at query time.
|
|
337
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:user_id") is supported for backwards
|
|
338
|
+
* compatibility but is deprecated; migrate to dot notation.
|
|
339
|
+
*/
|
|
340
|
+
name?: string | undefined;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export interface Feature {
|
|
344
|
+
/**
|
|
345
|
+
* The full three-part name (catalog, schema, name) of the feature. This is the
|
|
346
|
+
* feature's resource identifier; the catalog_name, schema_name, and name fields
|
|
347
|
+
* below are OUTPUT_ONLY decomposed views of this value.
|
|
348
|
+
*/
|
|
349
|
+
fullName?: string | undefined;
|
|
350
|
+
/** The data source of the feature. */
|
|
351
|
+
source?: DataSource | undefined;
|
|
352
|
+
/**
|
|
353
|
+
* Deprecated: Use AggregationFunction.inputs instead. Kept for backwards compatibility.
|
|
354
|
+
* The input columns from which the feature is computed.
|
|
355
|
+
*/
|
|
356
|
+
inputs?: string[] | undefined;
|
|
357
|
+
/** The function by which the feature is computed. */
|
|
358
|
+
function?: Function | undefined;
|
|
359
|
+
/**
|
|
360
|
+
* Deprecated: Use Function.aggregation_function.time_window instead. Kept for backwards compatibility.
|
|
361
|
+
* The time window in which the feature is computed.
|
|
362
|
+
*/
|
|
363
|
+
timeWindow?: TimeWindow | undefined;
|
|
364
|
+
/** The description of the feature. */
|
|
365
|
+
description?: string | undefined;
|
|
366
|
+
/**
|
|
367
|
+
* Deprecated: Use DeltaTableSource.filter_condition or KafkaSource.filter_condition instead. Kept for backwards compatibility.
|
|
368
|
+
* The filter condition applied to the source data before aggregation.
|
|
369
|
+
*/
|
|
370
|
+
filterCondition?: string | undefined;
|
|
371
|
+
/**
|
|
372
|
+
* Lineage context information for this feature.
|
|
373
|
+
* WARNING: This field is primarily intended for internal use by <Databricks> systems and
|
|
374
|
+
* is automatically populated when features are created through <Databricks> notebooks or jobs.
|
|
375
|
+
* Users should not manually set this field as incorrect values may lead to inaccurate lineage tracking or unexpected behavior.
|
|
376
|
+
* This field will be set by feature-engineering client and should be left unset by SDK and terraform users.
|
|
377
|
+
*/
|
|
378
|
+
lineageContext?: LineageContext | undefined;
|
|
379
|
+
/** The entity columns for the feature, used as aggregation keys and for query-time lookup. */
|
|
380
|
+
entities?: EntityColumn[] | undefined;
|
|
381
|
+
/** Column recording time, used for point-in-time joins, backfills, and aggregations. */
|
|
382
|
+
timeseriesColumn?: TimeseriesColumn | undefined;
|
|
383
|
+
/** Name of parent catalog. */
|
|
384
|
+
catalogName?: string | undefined;
|
|
385
|
+
/** Name of parent schema relative to its parent catalog. */
|
|
386
|
+
schemaName?: string | undefined;
|
|
387
|
+
/** Name of the feature, extracted from the full three-part name (catalog.schema.name). */
|
|
388
|
+
name?: string | undefined;
|
|
389
|
+
/** Time at which this feature was created. */
|
|
390
|
+
createdAt?: Temporal.Instant | undefined;
|
|
391
|
+
/** Username of the feature creator. */
|
|
392
|
+
createdBy?: string | undefined;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* A single field definition within a FlatSchema, specifying the field name and its scalar data type.
|
|
397
|
+
* Does not support nested or complex types (arrays, maps, structs).
|
|
398
|
+
*/
|
|
399
|
+
export interface FieldDefinition {
|
|
400
|
+
/** The name of the field. */
|
|
401
|
+
name?: string | undefined;
|
|
402
|
+
/** The scalar data type of the field. */
|
|
403
|
+
dataType?: ScalarDataType | undefined;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/** Returns the first value. */
|
|
407
|
+
export interface FirstFunction {
|
|
408
|
+
/** The input column from which the first value is returned. */
|
|
409
|
+
input?: string | undefined;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* A flat (non-nested) schema for request-time fields, defined as an ordered list of field definitions.
|
|
414
|
+
* This schema only supports scalar types.
|
|
415
|
+
*/
|
|
416
|
+
export interface FlatSchema {
|
|
417
|
+
/** The list of fields in this schema. */
|
|
418
|
+
fields?: FieldDefinition[] | undefined;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface Function {
|
|
422
|
+
/**
|
|
423
|
+
* Deprecated: Use the function oneof with AggregationFunction instead. Kept for backwards compatibility.
|
|
424
|
+
* The type of the function.
|
|
425
|
+
*/
|
|
426
|
+
functionType?: Function_FunctionType | undefined;
|
|
427
|
+
/**
|
|
428
|
+
* Deprecated: Use the function oneof with AggregationFunction instead. Kept for backwards compatibility.
|
|
429
|
+
* Extra parameters for parameterized functions.
|
|
430
|
+
*/
|
|
431
|
+
extraParameters?: Function_ExtraParameter[] | undefined;
|
|
432
|
+
function?:
|
|
433
|
+
| {
|
|
434
|
+
$case: 'aggregationFunction';
|
|
435
|
+
/** An aggregation function applied over a time window. */
|
|
436
|
+
aggregationFunction: AggregationFunction;
|
|
437
|
+
}
|
|
438
|
+
| {
|
|
439
|
+
$case: 'columnSelection';
|
|
440
|
+
/** Selects the latest value of a single column in a data source */
|
|
441
|
+
columnSelection: ColumnSelection;
|
|
442
|
+
}
|
|
443
|
+
| undefined;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Deprecated: Use typed fields on function-specific messages (e.g. ApproxPercentileFunction.percentile)
|
|
448
|
+
* or AggregationFunction.ExtraParameter instead. Kept for backwards compatibility.
|
|
449
|
+
*/
|
|
450
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
451
|
+
export interface Function_ExtraParameter {
|
|
452
|
+
/** The name of the parameter. */
|
|
453
|
+
key?: string | undefined;
|
|
454
|
+
/** The value of the parameter. */
|
|
455
|
+
value?: string | undefined;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export interface GetFeatureRequest {
|
|
459
|
+
/** Name of the feature to get. */
|
|
460
|
+
fullName?: string | undefined;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface GetKafkaConfigRequest {
|
|
464
|
+
/** Name of the Kafka config to get. */
|
|
465
|
+
name?: string | undefined;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface GetMaterializedFeatureRequest {
|
|
469
|
+
/** The ID of the materialized feature. */
|
|
470
|
+
materializedFeatureId?: string | undefined;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/** Get a Stream by its full three-part name (catalog.schema.stream). */
|
|
474
|
+
export interface GetStreamRequest {
|
|
475
|
+
/** Full three-part name (catalog.schema.stream) of the Stream to get. */
|
|
476
|
+
name?: string | undefined;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Configuration for the <Databricks>-managed ingestion pipeline.
|
|
481
|
+
* Groups the ingestion destination (required) and optional backfill source.
|
|
482
|
+
*/
|
|
483
|
+
export interface IngestionConfig {
|
|
484
|
+
/**
|
|
485
|
+
* Destination for the <Databricks>-managed Delta table that holds an offline copy of the streaming data for querying and training.
|
|
486
|
+
* This table contains both 1) forward-filled data from the Stream and 2) backfilled data from the BackfillSource (if provided).
|
|
487
|
+
* This table is created and managed by <Databricks> and is deleted when the Stream is deleted.
|
|
488
|
+
*/
|
|
489
|
+
ingestionDestination?: IngestionDestination | undefined;
|
|
490
|
+
/**
|
|
491
|
+
* A user-provided source for backfilling data. Historical data is used when creating a training set from streaming features linked to this Stream.
|
|
492
|
+
* The backfill data stored in this location will be copied into the ingestion table for offline querying and training.
|
|
493
|
+
* The schema for this source must match exactly that of the key and payload schemas specified for this Stream.
|
|
494
|
+
*/
|
|
495
|
+
backfillSource?: BackfillSource | undefined;
|
|
496
|
+
/**
|
|
497
|
+
* Column paths used to identify duplicate rows during ingestion; only one row per
|
|
498
|
+
* distinct combination of these values is kept. Use dot notation for nested fields
|
|
499
|
+
* (e.g. `value.user_id`). Empty list means every column is compared.
|
|
500
|
+
*/
|
|
501
|
+
deduplicationColumns?: string[] | undefined;
|
|
502
|
+
/**
|
|
503
|
+
* The ID of the SDP pipeline that continuously copies new events from the streaming source
|
|
504
|
+
* into the ingestion Delta table.
|
|
505
|
+
*/
|
|
506
|
+
ingestionPipelineId?: string | undefined;
|
|
507
|
+
/** The ID of the Databricks Job that performs the forward-fill ingestion. */
|
|
508
|
+
ingestionJobId?: bigint | undefined;
|
|
509
|
+
/** The ID of the Databricks Job that performs the historical backfill of the ingestion Delta table. */
|
|
510
|
+
backfillJobId?: bigint | undefined;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/** Destination for the <Databricks>-managed Delta table that holds an offline copy of the streaming data for querying and training. */
|
|
514
|
+
export interface IngestionDestination {
|
|
515
|
+
ingestionDestination?:
|
|
516
|
+
| {
|
|
517
|
+
$case: 'deltaTableName';
|
|
518
|
+
/** The full three-part name (catalog, schema, name) of the Delta table to be created for ingestion. */
|
|
519
|
+
deltaTableName: string;
|
|
520
|
+
}
|
|
521
|
+
| undefined;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export interface JobContext {
|
|
525
|
+
/** The job ID where this API invoked. */
|
|
526
|
+
jobId?: bigint | undefined;
|
|
527
|
+
/** The job run ID where this API was invoked. */
|
|
528
|
+
jobRunId?: bigint | undefined;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface KafkaConfig {
|
|
532
|
+
/**
|
|
533
|
+
* Name that uniquely identifies this Kafka config within the metastore. This will be the identifier used from the Feature object to reference these configs for a feature.
|
|
534
|
+
* Can be distinct from topic name.
|
|
535
|
+
*/
|
|
536
|
+
name?: string | undefined;
|
|
537
|
+
/** A comma-separated list of host/port pairs pointing to Kafka cluster. */
|
|
538
|
+
bootstrapServers?: string | undefined;
|
|
539
|
+
/** Options to configure which Kafka topics to pull data from. */
|
|
540
|
+
subscriptionMode?: SubscriptionMode | undefined;
|
|
541
|
+
/** Authentication configuration for connection to topics. */
|
|
542
|
+
authConfig?: AuthConfig | undefined;
|
|
543
|
+
/** Schema configuration for extracting message keys from topics. At least one of key_schema and value_schema must be provided. */
|
|
544
|
+
keySchema?: SchemaConfig | undefined;
|
|
545
|
+
/** Schema configuration for extracting message values from topics. At least one of key_schema and value_schema must be provided. */
|
|
546
|
+
valueSchema?: SchemaConfig | undefined;
|
|
547
|
+
/** Catch-all for miscellaneous options. Keys should be source options or Kafka consumer options (kafka.*) */
|
|
548
|
+
extraOptions?: Record<string, string> | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* A user-provided and managed source for backfilling data. Historical data is used when creating a training set from streaming features linked to this Kafka config.
|
|
551
|
+
* In the future, a separate table will be maintained by <Databricks> for forward filling data.
|
|
552
|
+
* The schema for this source must match exactly that of the key and value schemas specified for this Kafka config.
|
|
553
|
+
*/
|
|
554
|
+
backfillSource?: BackfillSource | undefined;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
558
|
+
export interface KafkaConfig_ExtraOptionsEntry {
|
|
559
|
+
key?: string | undefined;
|
|
560
|
+
value?: string | undefined;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface KafkaSource {
|
|
564
|
+
/** Name of the Kafka source, used to identify it. This is used to look up the corresponding KafkaConfig object. Can be distinct from topic name. */
|
|
565
|
+
name?: string | undefined;
|
|
566
|
+
/**
|
|
567
|
+
* Deprecated: Use Feature.entity instead. Kept for backwards compatibility.
|
|
568
|
+
* The entity column identifiers of the Kafka source.
|
|
569
|
+
*/
|
|
570
|
+
entityColumnIdentifiers?: ColumnIdentifier[] | undefined;
|
|
571
|
+
/**
|
|
572
|
+
* Deprecated: Use Feature.timeseries_column instead. Kept for backwards compatibility.
|
|
573
|
+
* The timeseries column identifier of the Kafka source.
|
|
574
|
+
*/
|
|
575
|
+
timeseriesColumnIdentifier?: ColumnIdentifier | undefined;
|
|
576
|
+
/** The filter condition applied to the source data before aggregation. */
|
|
577
|
+
filterCondition?: string | undefined;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/** Kafka-specific configuration for a Stream. */
|
|
581
|
+
export interface KafkaStreamConfig {
|
|
582
|
+
/** Options to configure which Kafka topics to pull data from. */
|
|
583
|
+
subscriptionMode?: KafkaSubscriptionMode | undefined;
|
|
584
|
+
/**
|
|
585
|
+
* Miscellaneous source options. Accepted keys are source options or Kafka consumer options (kafka.*),
|
|
586
|
+
* validated against an allow-list at request time.
|
|
587
|
+
* All auth configuration goes through the underlying UC Connection(s) or configs and should not be stored here.
|
|
588
|
+
*/
|
|
589
|
+
extraOptions?: Record<string, string> | undefined;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
593
|
+
export interface KafkaStreamConfig_ExtraOptionsEntry {
|
|
594
|
+
key?: string | undefined;
|
|
595
|
+
value?: string | undefined;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/** Subscription mode for Kafka topic selection, matching standard Spark Structured Streaming options. */
|
|
599
|
+
export interface KafkaSubscriptionMode {
|
|
600
|
+
/** These match the settings from https://spark.apache.org/docs/latest/streaming/structured-streaming-kafka-integration.html */
|
|
601
|
+
subscriptionMode?:
|
|
602
|
+
| {
|
|
603
|
+
$case: 'assign';
|
|
604
|
+
/**
|
|
605
|
+
* A JSON string that contains the specific topic-partitions to consume from.
|
|
606
|
+
* For example, for '{"topicA":[0,1],"topicB":[2,4]}', topicA's 0'th and 1st partitions will be consumed from.
|
|
607
|
+
*/
|
|
608
|
+
assign: string;
|
|
609
|
+
}
|
|
610
|
+
| {
|
|
611
|
+
$case: 'subscribe';
|
|
612
|
+
/** A comma-separated list of Kafka topics to read from. For example, 'topicA,topicB,topicC'. */
|
|
613
|
+
subscribe: string;
|
|
614
|
+
}
|
|
615
|
+
| {
|
|
616
|
+
$case: 'subscribePattern';
|
|
617
|
+
/** A regular expression matching topics to subscribe to. For example, 'topic.*' will subscribe to all topics starting with 'topic'. */
|
|
618
|
+
subscribePattern: string;
|
|
619
|
+
}
|
|
620
|
+
| undefined;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** Returns the last value. */
|
|
624
|
+
export interface LastFunction {
|
|
625
|
+
/** The input column from which the last value is returned. */
|
|
626
|
+
input?: string | undefined;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/** Lineage context information for tracking where an API was invoked. This will allow us to track lineage, which currently uses caller entity information for use across the Lineage Client and Observability in Lumberjack. */
|
|
630
|
+
export interface LineageContext {
|
|
631
|
+
/** The notebook ID where this API was invoked. */
|
|
632
|
+
notebookId?: bigint | undefined;
|
|
633
|
+
/** Job context information including job ID and run ID. */
|
|
634
|
+
jobContext?: JobContext | undefined;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Request to list features. Listing is always scoped to a single catalog and schema;
|
|
639
|
+
* catalog_name and schema_name are required.
|
|
640
|
+
*/
|
|
641
|
+
export interface ListFeaturesRequest {
|
|
642
|
+
/** Pagination token to go to the next page based on a previous query. */
|
|
643
|
+
pageToken?: string | undefined;
|
|
644
|
+
/** The maximum number of results to return. */
|
|
645
|
+
pageSize?: number | undefined;
|
|
646
|
+
/** Name of parent catalog for features of interest. */
|
|
647
|
+
catalogName?: string | undefined;
|
|
648
|
+
/** Name of parent schema relative to its parent catalog. */
|
|
649
|
+
schemaName?: string | undefined;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export interface ListFeaturesResponse {
|
|
653
|
+
/** List of features. */
|
|
654
|
+
features?: Feature[] | undefined;
|
|
655
|
+
/** Pagination token to request the next page of results for this query. */
|
|
656
|
+
nextPageToken?: string | undefined;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface ListKafkaConfigsRequest {
|
|
660
|
+
/** Pagination token to go to the next page based on a previous query. */
|
|
661
|
+
pageToken?: string | undefined;
|
|
662
|
+
/** The maximum number of results to return. */
|
|
663
|
+
pageSize?: number | undefined;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export interface ListKafkaConfigsResponse {
|
|
667
|
+
/** List of Kafka configs. Schemas are not included in the response. */
|
|
668
|
+
kafkaConfigs?: KafkaConfig[] | undefined;
|
|
669
|
+
/** Pagination token to request the next page of results for this query. */
|
|
670
|
+
nextPageToken?: string | undefined;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export interface ListMaterializedFeaturesRequest {
|
|
674
|
+
/** Filter by feature name. If specified, only materialized features materialized from this feature will be returned. */
|
|
675
|
+
featureName?: string | undefined;
|
|
676
|
+
/** Pagination token to go to the next page based on a previous query. */
|
|
677
|
+
pageToken?: string | undefined;
|
|
678
|
+
/** The maximum number of results to return. Defaults to 100 if not specified. Cannot be greater than 1000. */
|
|
679
|
+
pageSize?: number | undefined;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface ListMaterializedFeaturesResponse {
|
|
683
|
+
/** List of materialized features. */
|
|
684
|
+
materializedFeatures?: MaterializedFeature[] | undefined;
|
|
685
|
+
/** Pagination token to request the next page of results for this query. */
|
|
686
|
+
nextPageToken?: string | undefined;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/** List Streams under a given parent. */
|
|
690
|
+
export interface ListStreamsRequest {
|
|
691
|
+
/** Two-part name (catalog.schema) of the parent under which to list Streams. */
|
|
692
|
+
parent?: string | undefined;
|
|
693
|
+
/** The maximum number of results to return. */
|
|
694
|
+
pageSize?: number | undefined;
|
|
695
|
+
/** Pagination token to go to the next page based on a previous query. */
|
|
696
|
+
pageToken?: string | undefined;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/** Response to a ListStreamsRequest. */
|
|
700
|
+
export interface ListStreamsResponse {
|
|
701
|
+
/** List of Streams. */
|
|
702
|
+
streams?: Stream[] | undefined;
|
|
703
|
+
/** Pagination token to request the next page of results for this query. */
|
|
704
|
+
nextPageToken?: string | undefined;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/** A materialized feature represents a feature that is continuously computed and stored. */
|
|
708
|
+
export interface MaterializedFeature {
|
|
709
|
+
/** Server-assigned unique identifier for the materialized feature. */
|
|
710
|
+
materializedFeatureId?: string | undefined;
|
|
711
|
+
/** The full name of the feature in Unity Catalog. */
|
|
712
|
+
featureName?: string | undefined;
|
|
713
|
+
destination?:
|
|
714
|
+
| {
|
|
715
|
+
$case: 'offlineStoreConfig';
|
|
716
|
+
/** Destination for writing feature values to an offline Delta table. */
|
|
717
|
+
offlineStoreConfig: OfflineStoreConfig;
|
|
718
|
+
}
|
|
719
|
+
| {
|
|
720
|
+
$case: 'onlineStoreConfig';
|
|
721
|
+
/** Destination for writing feature values to an online Lakebase table. */
|
|
722
|
+
onlineStoreConfig: OnlineStoreConfig;
|
|
723
|
+
}
|
|
724
|
+
| undefined;
|
|
725
|
+
/** The fully qualified Unity Catalog path to the table containing the materialized feature (Delta table or Lakebase table). Output only. */
|
|
726
|
+
tableName?: string | undefined;
|
|
727
|
+
/** The schedule state of the materialization pipeline. */
|
|
728
|
+
pipelineScheduleState?: MaterializedFeature_PipelineScheduleState | undefined;
|
|
729
|
+
/**
|
|
730
|
+
* The timestamp when the pipeline last ran and updated the materialized feature values.
|
|
731
|
+
* If the pipeline has not run yet, this field will be null.
|
|
732
|
+
*/
|
|
733
|
+
lastMaterializationTime?: Temporal.Instant | undefined;
|
|
734
|
+
/** The quartz cron expression that defines the schedule of the materialization pipeline. The schedule is evaluated in the UTC timezone. */
|
|
735
|
+
cronSchedule?: string | undefined;
|
|
736
|
+
/** True if this is an online materialized feature. False if it is an offline materialized feature. */
|
|
737
|
+
isOnline?: boolean | undefined;
|
|
738
|
+
/** The trigger configuration for the materialization pipeline. */
|
|
739
|
+
trigger?:
|
|
740
|
+
| {
|
|
741
|
+
$case: 'cronScheduleTrigger';
|
|
742
|
+
/** A cron-based schedule trigger for the materialization pipeline. */
|
|
743
|
+
cronScheduleTrigger: CronSchedule;
|
|
744
|
+
}
|
|
745
|
+
| {
|
|
746
|
+
$case: 'tableTrigger';
|
|
747
|
+
/** A trigger that fires when the upstream source table changes. */
|
|
748
|
+
tableTrigger: TableTrigger;
|
|
749
|
+
}
|
|
750
|
+
| {
|
|
751
|
+
$case: 'streamingMode';
|
|
752
|
+
/**
|
|
753
|
+
* The Structured Streaming trigger mode used for materialization. Real-time mode (RTM) targets
|
|
754
|
+
* sub-second latency for operational workloads; micro-batch mode (MBM) favors cost efficiency
|
|
755
|
+
* for ETL and analytics workloads.
|
|
756
|
+
*/
|
|
757
|
+
streamingMode: StreamingMode;
|
|
758
|
+
}
|
|
759
|
+
| undefined;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/** Computes the maximum value. */
|
|
763
|
+
export interface MaxFunction {
|
|
764
|
+
/** The input column from which the maximum is computed. */
|
|
765
|
+
input?: string | undefined;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/** Computes the minimum value. */
|
|
769
|
+
export interface MinFunction {
|
|
770
|
+
/** The input column from which the minimum is computed. */
|
|
771
|
+
input?: string | undefined;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Mutual-TLS (mTLS) authentication configuration. The keystore (client certificate +
|
|
776
|
+
* private key) and truststore (CAs trusted to verify the broker) live as JKS files on
|
|
777
|
+
* Unity Catalog volumes, with their passwords stored in <Databricks> secret scopes. This
|
|
778
|
+
* matches the SSL setup pattern documented at
|
|
779
|
+
* https://docs.databricks.com/en/connect/streaming/kafka/authentication#use-ssl-to-connect-databricks-to-kafka.
|
|
780
|
+
*
|
|
781
|
+
* At materialization time, the generated PySpark code passes the JKS file paths and
|
|
782
|
+
* resolved passwords through to the Kafka SSL options (kafka.ssl.keystore.location,
|
|
783
|
+
* kafka.ssl.keystore.password, kafka.ssl.key.password, kafka.ssl.truststore.location,
|
|
784
|
+
* kafka.ssl.truststore.password). Passwords are resolved on the Spark cluster via
|
|
785
|
+
* dbutils.secrets.get; this message stores only references, never password values.
|
|
786
|
+
*/
|
|
787
|
+
export interface MtlsConfig {
|
|
788
|
+
/**
|
|
789
|
+
* Unity Catalog volume path to the JKS keystore file containing the client certificate
|
|
790
|
+
* and private key. e.g. "/Volumes/<catalog>/<schema>/<volume>/client.jks". The
|
|
791
|
+
* materialization compute must have read permission on this volume.
|
|
792
|
+
*/
|
|
793
|
+
keystoreLocation?: string | undefined;
|
|
794
|
+
/** Secret-scope reference for the JKS keystore password. */
|
|
795
|
+
keystorePasswordRef?: SecretScopeReference | undefined;
|
|
796
|
+
/**
|
|
797
|
+
* Secret-scope reference for the private key password. Often the same value as the
|
|
798
|
+
* keystore password (keytool's default), but provided as a separate field because
|
|
799
|
+
* Apache Kafka requires it as a distinct option (kafka.ssl.key.password).
|
|
800
|
+
*/
|
|
801
|
+
keyPasswordRef?: SecretScopeReference | undefined;
|
|
802
|
+
/**
|
|
803
|
+
* Unity Catalog volume path to the JKS truststore file containing the CA certificate(s)
|
|
804
|
+
* trusted to verify the Kafka broker's server certificate.
|
|
805
|
+
* e.g. "/Volumes/<catalog>/<schema>/<volume>/truststore.jks".
|
|
806
|
+
*/
|
|
807
|
+
truststoreLocation?: string | undefined;
|
|
808
|
+
/** Secret-scope reference for the JKS truststore password. */
|
|
809
|
+
truststorePasswordRef?: SecretScopeReference | undefined;
|
|
810
|
+
/**
|
|
811
|
+
* Set to true only when the broker certificate's SAN intentionally does not match
|
|
812
|
+
* the connection endpoint — for example when reaching the cluster through a
|
|
813
|
+
* PrivateLink endpoint whose DNS name is not in the broker certificate. Skipping
|
|
814
|
+
* the hostname check removes a defense against man-in-the-middle attacks; do not
|
|
815
|
+
* enable casually. mTLS client authentication is unaffected by this option.
|
|
816
|
+
*
|
|
817
|
+
* See the Apache Kafka SSL security guide for background on this check:
|
|
818
|
+
* https://kafka.apache.org/42/security/encryption-and-authentication-using-ssl/#host-name-verification
|
|
819
|
+
*/
|
|
820
|
+
disableHostnameVerification?: boolean | undefined;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/** Configuration for offline store destination. */
|
|
824
|
+
export interface OfflineStoreConfig {
|
|
825
|
+
/** The Unity Catalog catalog name. */
|
|
826
|
+
catalogName?: string | undefined;
|
|
827
|
+
/** The Unity Catalog schema name. */
|
|
828
|
+
schemaName?: string | undefined;
|
|
829
|
+
/**
|
|
830
|
+
* Prefix for Unity Catalog table name.
|
|
831
|
+
* The materialized feature will be stored in a table with this prefix and a generated postfix.
|
|
832
|
+
*/
|
|
833
|
+
tableNamePrefix?: string | undefined;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/** Configuration for online store destination. */
|
|
837
|
+
export interface OnlineStoreConfig {
|
|
838
|
+
/**
|
|
839
|
+
* The Unity Catalog catalog name. This name is also used as the Lakebase logical database name.
|
|
840
|
+
* Quoting is handled by the backend where needed, do not pre-quote it.
|
|
841
|
+
*/
|
|
842
|
+
catalogName?: string | undefined;
|
|
843
|
+
/**
|
|
844
|
+
* The Unity Catalog schema name. This name is also used as the Lakebase schema name under the database.
|
|
845
|
+
* Quoting is handled by the backend where needed, do not pre-quote it.
|
|
846
|
+
*/
|
|
847
|
+
schemaName?: string | undefined;
|
|
848
|
+
/**
|
|
849
|
+
* Prefix for Unity Catalog table name.
|
|
850
|
+
* The materialized feature will be stored in a Lakebase table with this prefix and a generated postfix.
|
|
851
|
+
*/
|
|
852
|
+
tableNamePrefix?: string | undefined;
|
|
853
|
+
/** The name of the target online store. */
|
|
854
|
+
onlineStoreName?: string | undefined;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/** A request-time data source whose value is provided at inference time: offline batch scoring or online serving endpoint */
|
|
858
|
+
export interface RequestSource {
|
|
859
|
+
/** The schema describing the request-time fields. Currently only flat schemas are supported. */
|
|
860
|
+
schema?:
|
|
861
|
+
| {
|
|
862
|
+
$case: 'flatSchema';
|
|
863
|
+
/** A flat schema with scalar-typed fields only. */
|
|
864
|
+
flatSchema: FlatSchema;
|
|
865
|
+
}
|
|
866
|
+
| undefined;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* A rolling time window with an optional delay. This is the SQL-spec-aligned
|
|
871
|
+
* replacement for ContinuousWindow: `delay` is the non-negative counterpart
|
|
872
|
+
* of the legacy non-positive `ContinuousWindow.offset`.
|
|
873
|
+
*/
|
|
874
|
+
export interface RollingWindow {
|
|
875
|
+
/** The duration of the rolling window (must be positive). */
|
|
876
|
+
windowDuration?: Temporal.Duration | undefined;
|
|
877
|
+
/**
|
|
878
|
+
* The delay applied to the end of the rolling window (must be non-negative).
|
|
879
|
+
* For example, delay=1d shifts the window end 1 day before the evaluation time.
|
|
880
|
+
*/
|
|
881
|
+
delay?: Temporal.Duration | undefined;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export interface SchemaConfig {
|
|
885
|
+
schema?:
|
|
886
|
+
| {
|
|
887
|
+
$case: 'jsonSchema';
|
|
888
|
+
/** Schema of the JSON object in standard IETF JSON schema format (https://json-schema.org/). */
|
|
889
|
+
jsonSchema: string;
|
|
890
|
+
}
|
|
891
|
+
| undefined;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Reference to an entry in a <Databricks> secret scope. The referenced value is fetched
|
|
896
|
+
* on the Spark cluster at materialization time via dbutils.secrets.get(scope, key).
|
|
897
|
+
*/
|
|
898
|
+
export interface SecretScopeReference {
|
|
899
|
+
/** The <Databricks> secret scope name. */
|
|
900
|
+
scope?: string | undefined;
|
|
901
|
+
/** The key within the scope. */
|
|
902
|
+
key?: string | undefined;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
export interface SlidingWindow {
|
|
906
|
+
/** The duration of the sliding window. */
|
|
907
|
+
windowDuration?: Temporal.Duration | undefined;
|
|
908
|
+
/** The slide duration (interval by which windows advance, must be positive and less than duration). */
|
|
909
|
+
slideDuration?: Temporal.Duration | undefined;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/** Computes the population standard deviation. */
|
|
913
|
+
export interface StddevPopFunction {
|
|
914
|
+
/**
|
|
915
|
+
* The input column from which the population standard deviation is computed. For Kafka sources,
|
|
916
|
+
* use dot-prefixed path notation (e.g., "value.amount"). For nested fields, the leaf node name is used.
|
|
917
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:amount") is supported for backwards
|
|
918
|
+
* compatibility but is deprecated; migrate to dot notation.
|
|
919
|
+
*/
|
|
920
|
+
input?: string | undefined;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/** Computes the sample standard deviation. */
|
|
924
|
+
export interface StddevSampFunction {
|
|
925
|
+
/** The input column from which the sample standard deviation is computed. */
|
|
926
|
+
input?: string | undefined;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* A Stream is a governed UC entity representing an external streaming data source.
|
|
931
|
+
* The source_config oneof determines the streaming platform source (e.g. Kafka, Kinesis, etc.).
|
|
932
|
+
*/
|
|
933
|
+
export interface Stream {
|
|
934
|
+
/** Full three-part (catalog.schema.stream) name of the stream. */
|
|
935
|
+
name?: string | undefined;
|
|
936
|
+
/** User-provided description. */
|
|
937
|
+
description?: string | undefined;
|
|
938
|
+
/** Source-specific configuration. Determines the streaming platform source. */
|
|
939
|
+
sourceConfig?: StreamSourceConfig | undefined;
|
|
940
|
+
/** Specifies how to connect and authenticate to the stream platform. */
|
|
941
|
+
connectionConfig?: StreamConnectionConfig | undefined;
|
|
942
|
+
/**
|
|
943
|
+
* Schema definitions for the stream. Currently only direct schemas are supported.
|
|
944
|
+
* In a future milestone, we will support schema registries through a UC Connection.
|
|
945
|
+
*/
|
|
946
|
+
schemaConfig?: StreamSchemaConfig | undefined;
|
|
947
|
+
/** Configuration for streaming data ingestion: the managed table storing an offline copy of forward fill data and optional historical backfill. */
|
|
948
|
+
ingestionConfig?: IngestionConfig | undefined;
|
|
949
|
+
/** Time at which this Stream was created. */
|
|
950
|
+
createTime?: Temporal.Instant | undefined;
|
|
951
|
+
/** Username of the Stream creator. */
|
|
952
|
+
createdBy?: string | undefined;
|
|
953
|
+
/** Time at which this Stream was last modified. */
|
|
954
|
+
updateTime?: Temporal.Instant | undefined;
|
|
955
|
+
/** Username of user who last modified the Stream. */
|
|
956
|
+
updatedBy?: string | undefined;
|
|
957
|
+
/**
|
|
958
|
+
* Indicates whether the principal is limited to retrieving metadata for the
|
|
959
|
+
* associated object through the BROWSE privilege when include_browse is enabled in the request.
|
|
960
|
+
*/
|
|
961
|
+
browseOnly?: boolean | undefined;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/** Specifies how to connect and authenticate to the stream platform. */
|
|
965
|
+
export interface StreamConnectionConfig {
|
|
966
|
+
connectionConfig?:
|
|
967
|
+
| {
|
|
968
|
+
$case: 'ucConnectionName';
|
|
969
|
+
/**
|
|
970
|
+
* Name of an existing UC Connection for stream platform access.
|
|
971
|
+
* Must be the correct type for the streaming platform (e.g. a Kafka Connection for a Kafka Stream).
|
|
972
|
+
*/
|
|
973
|
+
ucConnectionName: string;
|
|
974
|
+
}
|
|
975
|
+
| {
|
|
976
|
+
$case: 'directMtlsConfig';
|
|
977
|
+
/**
|
|
978
|
+
* Direct mTLS configuration for stream platform access. This is only used in the short term until UC Kafka Connections support mTLS (XTA-18030).
|
|
979
|
+
* Once UC Kafka Connections support mTLS, this will be deprecated.
|
|
980
|
+
*/
|
|
981
|
+
directMtlsConfig: DirectMtlsConfig;
|
|
982
|
+
}
|
|
983
|
+
| undefined;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Schema definitions for the stream. Currently only direct schemas are supported.
|
|
988
|
+
* In a future milestone, we will support schema registries through a UC Connection.
|
|
989
|
+
*/
|
|
990
|
+
export interface StreamSchemaConfig {
|
|
991
|
+
schemaConfig?:
|
|
992
|
+
| {
|
|
993
|
+
$case: 'directSchemas';
|
|
994
|
+
/** Schema definitions provided directly on the Stream. */
|
|
995
|
+
directSchemas: DirectSchemas;
|
|
996
|
+
}
|
|
997
|
+
| undefined;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/** Source-specific configuration. Determines the streaming platform source. */
|
|
1001
|
+
export interface StreamSourceConfig {
|
|
1002
|
+
sourceConfig?:
|
|
1003
|
+
| {
|
|
1004
|
+
$case: 'kafkaStreamConfig';
|
|
1005
|
+
/** Configuration for Apache Kafka streams. */
|
|
1006
|
+
kafkaStreamConfig: KafkaStreamConfig;
|
|
1007
|
+
}
|
|
1008
|
+
| undefined;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/** The streaming mode configuration for a streaming materialization pipeline. */
|
|
1012
|
+
export interface StreamingMode {
|
|
1013
|
+
/** The type of streaming mode used by the materialization pipeline. */
|
|
1014
|
+
mode?: StreamingMode_StreamingModeType | undefined;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/** Deprecated: Use KafkaSubscriptionMode instead. */
|
|
1018
|
+
export interface SubscriptionMode {
|
|
1019
|
+
/** These match the settings from https://spark.apache.org/docs/latest/streaming/structured-streaming-kafka-integration.html */
|
|
1020
|
+
subscriptionMode?:
|
|
1021
|
+
| {
|
|
1022
|
+
$case: 'assign';
|
|
1023
|
+
/**
|
|
1024
|
+
* A JSON string that contains the specific topic-partitions to consume from.
|
|
1025
|
+
* For example, for '{"topicA":[0,1],"topicB":[2,4]}', topicA's 0'th and 1st partitions will be consumed from.
|
|
1026
|
+
*/
|
|
1027
|
+
assign: string;
|
|
1028
|
+
}
|
|
1029
|
+
| {
|
|
1030
|
+
$case: 'subscribe';
|
|
1031
|
+
/** A comma-separated list of Kafka topics to read from. For example, 'topicA,topicB,topicC'. */
|
|
1032
|
+
subscribe: string;
|
|
1033
|
+
}
|
|
1034
|
+
| {
|
|
1035
|
+
$case: 'subscribePattern';
|
|
1036
|
+
/** A regular expression matching topics to subscribe to. For example, 'topic.*' will subscribe to all topics starting with 'topic'. */
|
|
1037
|
+
subscribePattern: string;
|
|
1038
|
+
}
|
|
1039
|
+
| undefined;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/** Computes the sum of values. */
|
|
1043
|
+
export interface SumFunction {
|
|
1044
|
+
/**
|
|
1045
|
+
* The input column from which the sum is computed. For Kafka sources, use dot-prefixed path
|
|
1046
|
+
* notation (e.g., "value.amount"). For nested fields, the leaf node name is used.
|
|
1047
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:amount") is supported for backwards
|
|
1048
|
+
* compatibility but is deprecated; migrate to dot notation.
|
|
1049
|
+
*/
|
|
1050
|
+
input?: string | undefined;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/** A trigger that fires when the upstream source table changes. */
|
|
1054
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1055
|
+
export interface TableTrigger {}
|
|
1056
|
+
|
|
1057
|
+
export interface TimeWindow {
|
|
1058
|
+
windowType?:
|
|
1059
|
+
| {$case: 'continuous'; continuous: ContinuousWindow}
|
|
1060
|
+
| {$case: 'tumbling'; tumbling: TumblingWindow}
|
|
1061
|
+
| {$case: 'sliding'; sliding: SlidingWindow}
|
|
1062
|
+
| {$case: 'rolling'; rolling: RollingWindow}
|
|
1063
|
+
| undefined;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export interface TimeseriesColumn {
|
|
1067
|
+
/**
|
|
1068
|
+
* The name of the timeseries column. For Kafka sources, use dot-prefixed path notation to
|
|
1069
|
+
* reference fields within the key or value schema (e.g., "value.event_timestamp"). For nested
|
|
1070
|
+
* fields, the leaf node name (e.g., "event_timestamp" from "value.event_details.event_timestamp")
|
|
1071
|
+
* is what will be present in materialized tables and expected to match at query time.
|
|
1072
|
+
* TODO(FS-939): Colon-prefixed notation (e.g., "value:event_timestamp") is supported for
|
|
1073
|
+
* backwards compatibility but is deprecated; migrate to dot notation.
|
|
1074
|
+
*/
|
|
1075
|
+
name?: string | undefined;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export interface TumblingWindow {
|
|
1079
|
+
/** The duration of each tumbling window (non-overlapping, fixed-duration windows). */
|
|
1080
|
+
windowDuration?: Temporal.Duration | undefined;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export interface UpdateFeatureRequest {
|
|
1084
|
+
/** Feature to update. */
|
|
1085
|
+
feature?: Feature | undefined;
|
|
1086
|
+
/** The list of fields to update. */
|
|
1087
|
+
updateMask?: FieldMask<Feature> | undefined;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
export interface UpdateKafkaConfigRequest {
|
|
1091
|
+
/** The Kafka config to update. */
|
|
1092
|
+
kafkaConfig?: KafkaConfig | undefined;
|
|
1093
|
+
/** The list of fields to update. */
|
|
1094
|
+
updateMask?: FieldMask<KafkaConfig> | undefined;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export interface UpdateMaterializedFeatureRequest {
|
|
1098
|
+
/** The materialized feature to update. */
|
|
1099
|
+
materializedFeature?: MaterializedFeature | undefined;
|
|
1100
|
+
/**
|
|
1101
|
+
* Provide the materialization feature fields which should be updated.
|
|
1102
|
+
* Currently, only the pipeline_state field can be updated.
|
|
1103
|
+
*/
|
|
1104
|
+
updateMask?: FieldMask<MaterializedFeature> | undefined;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/** Update a Stream. Only fields listed in `update_mask` are mutated. */
|
|
1108
|
+
export interface UpdateStreamRequest {
|
|
1109
|
+
/** The Stream to update. */
|
|
1110
|
+
stream?: Stream | undefined;
|
|
1111
|
+
/** The list of fields to update. */
|
|
1112
|
+
updateMask?: FieldMask<Stream> | undefined;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
/** Computes the population variance. */
|
|
1116
|
+
export interface VarPopFunction {
|
|
1117
|
+
/** The input column from which the population variance is computed. */
|
|
1118
|
+
input?: string | undefined;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/** Computes the sample variance. */
|
|
1122
|
+
export interface VarSampFunction {
|
|
1123
|
+
/** The input column from which the sample variance is computed. */
|
|
1124
|
+
input?: string | undefined;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
export const unmarshalAggregationFunctionSchema: z.ZodType<AggregationFunction> =
|
|
1128
|
+
z
|
|
1129
|
+
.object({
|
|
1130
|
+
avg: z.lazy(() => unmarshalAvgFunctionSchema).optional(),
|
|
1131
|
+
count_function: z.lazy(() => unmarshalCountFunctionSchema).optional(),
|
|
1132
|
+
sum: z.lazy(() => unmarshalSumFunctionSchema).optional(),
|
|
1133
|
+
min: z.lazy(() => unmarshalMinFunctionSchema).optional(),
|
|
1134
|
+
max: z.lazy(() => unmarshalMaxFunctionSchema).optional(),
|
|
1135
|
+
first: z.lazy(() => unmarshalFirstFunctionSchema).optional(),
|
|
1136
|
+
last: z.lazy(() => unmarshalLastFunctionSchema).optional(),
|
|
1137
|
+
approx_count_distinct: z
|
|
1138
|
+
.lazy(() => unmarshalApproxCountDistinctFunctionSchema)
|
|
1139
|
+
.optional(),
|
|
1140
|
+
approx_percentile: z
|
|
1141
|
+
.lazy(() => unmarshalApproxPercentileFunctionSchema)
|
|
1142
|
+
.optional(),
|
|
1143
|
+
stddev_pop: z.lazy(() => unmarshalStddevPopFunctionSchema).optional(),
|
|
1144
|
+
stddev_samp: z.lazy(() => unmarshalStddevSampFunctionSchema).optional(),
|
|
1145
|
+
var_pop: z.lazy(() => unmarshalVarPopFunctionSchema).optional(),
|
|
1146
|
+
var_samp: z.lazy(() => unmarshalVarSampFunctionSchema).optional(),
|
|
1147
|
+
time_window: z.lazy(() => unmarshalTimeWindowSchema).optional(),
|
|
1148
|
+
})
|
|
1149
|
+
.transform(d => ({
|
|
1150
|
+
operation:
|
|
1151
|
+
d.avg !== undefined
|
|
1152
|
+
? {$case: 'avg' as const, avg: d.avg}
|
|
1153
|
+
: d.count_function !== undefined
|
|
1154
|
+
? {$case: 'countFunction' as const, countFunction: d.count_function}
|
|
1155
|
+
: d.sum !== undefined
|
|
1156
|
+
? {$case: 'sum' as const, sum: d.sum}
|
|
1157
|
+
: d.min !== undefined
|
|
1158
|
+
? {$case: 'min' as const, min: d.min}
|
|
1159
|
+
: d.max !== undefined
|
|
1160
|
+
? {$case: 'max' as const, max: d.max}
|
|
1161
|
+
: d.first !== undefined
|
|
1162
|
+
? {$case: 'first' as const, first: d.first}
|
|
1163
|
+
: d.last !== undefined
|
|
1164
|
+
? {$case: 'last' as const, last: d.last}
|
|
1165
|
+
: d.approx_count_distinct !== undefined
|
|
1166
|
+
? {
|
|
1167
|
+
$case: 'approxCountDistinct' as const,
|
|
1168
|
+
approxCountDistinct: d.approx_count_distinct,
|
|
1169
|
+
}
|
|
1170
|
+
: d.approx_percentile !== undefined
|
|
1171
|
+
? {
|
|
1172
|
+
$case: 'approxPercentile' as const,
|
|
1173
|
+
approxPercentile: d.approx_percentile,
|
|
1174
|
+
}
|
|
1175
|
+
: d.stddev_pop !== undefined
|
|
1176
|
+
? {
|
|
1177
|
+
$case: 'stddevPop' as const,
|
|
1178
|
+
stddevPop: d.stddev_pop,
|
|
1179
|
+
}
|
|
1180
|
+
: d.stddev_samp !== undefined
|
|
1181
|
+
? {
|
|
1182
|
+
$case: 'stddevSamp' as const,
|
|
1183
|
+
stddevSamp: d.stddev_samp,
|
|
1184
|
+
}
|
|
1185
|
+
: d.var_pop !== undefined
|
|
1186
|
+
? {$case: 'varPop' as const, varPop: d.var_pop}
|
|
1187
|
+
: d.var_samp !== undefined
|
|
1188
|
+
? {
|
|
1189
|
+
$case: 'varSamp' as const,
|
|
1190
|
+
varSamp: d.var_samp,
|
|
1191
|
+
}
|
|
1192
|
+
: undefined,
|
|
1193
|
+
timeWindow: d.time_window,
|
|
1194
|
+
}));
|
|
1195
|
+
|
|
1196
|
+
export const unmarshalApproxCountDistinctFunctionSchema: z.ZodType<ApproxCountDistinctFunction> =
|
|
1197
|
+
z
|
|
1198
|
+
.object({
|
|
1199
|
+
input: z.string().optional(),
|
|
1200
|
+
relative_sd: z.number().optional(),
|
|
1201
|
+
})
|
|
1202
|
+
.transform(d => ({
|
|
1203
|
+
input: d.input,
|
|
1204
|
+
relativeSd: d.relative_sd,
|
|
1205
|
+
}));
|
|
1206
|
+
|
|
1207
|
+
export const unmarshalApproxPercentileFunctionSchema: z.ZodType<ApproxPercentileFunction> =
|
|
1208
|
+
z
|
|
1209
|
+
.object({
|
|
1210
|
+
input: z.string().optional(),
|
|
1211
|
+
percentile: z.number().optional(),
|
|
1212
|
+
accuracy: z
|
|
1213
|
+
.union([z.number(), z.bigint()])
|
|
1214
|
+
.transform(v => BigInt(v))
|
|
1215
|
+
.optional(),
|
|
1216
|
+
})
|
|
1217
|
+
.transform(d => ({
|
|
1218
|
+
input: d.input,
|
|
1219
|
+
percentile: d.percentile,
|
|
1220
|
+
accuracy: d.accuracy,
|
|
1221
|
+
}));
|
|
1222
|
+
|
|
1223
|
+
export const unmarshalAuthConfigSchema: z.ZodType<AuthConfig> = z
|
|
1224
|
+
.object({
|
|
1225
|
+
uc_service_credential_name: z.string().optional(),
|
|
1226
|
+
mtls_config: z.lazy(() => unmarshalMtlsConfigSchema).optional(),
|
|
1227
|
+
})
|
|
1228
|
+
.transform(d => ({
|
|
1229
|
+
authConfig:
|
|
1230
|
+
d.uc_service_credential_name !== undefined
|
|
1231
|
+
? {
|
|
1232
|
+
$case: 'ucServiceCredentialName' as const,
|
|
1233
|
+
ucServiceCredentialName: d.uc_service_credential_name,
|
|
1234
|
+
}
|
|
1235
|
+
: d.mtls_config !== undefined
|
|
1236
|
+
? {$case: 'mtlsConfig' as const, mtlsConfig: d.mtls_config}
|
|
1237
|
+
: undefined,
|
|
1238
|
+
}));
|
|
1239
|
+
|
|
1240
|
+
export const unmarshalAvgFunctionSchema: z.ZodType<AvgFunction> = z
|
|
1241
|
+
.object({
|
|
1242
|
+
input: z.string().optional(),
|
|
1243
|
+
})
|
|
1244
|
+
.transform(d => ({
|
|
1245
|
+
input: d.input,
|
|
1246
|
+
}));
|
|
1247
|
+
|
|
1248
|
+
export const unmarshalBackfillSourceSchema: z.ZodType<BackfillSource> = z
|
|
1249
|
+
.object({
|
|
1250
|
+
delta_table_source: z
|
|
1251
|
+
.lazy(() => unmarshalDeltaTableSourceSchema)
|
|
1252
|
+
.optional(),
|
|
1253
|
+
delta_table_name: z.string().optional(),
|
|
1254
|
+
})
|
|
1255
|
+
.transform(d => ({
|
|
1256
|
+
backfillSource:
|
|
1257
|
+
d.delta_table_source !== undefined
|
|
1258
|
+
? {
|
|
1259
|
+
$case: 'deltaTableSource' as const,
|
|
1260
|
+
deltaTableSource: d.delta_table_source,
|
|
1261
|
+
}
|
|
1262
|
+
: d.delta_table_name !== undefined
|
|
1263
|
+
? {
|
|
1264
|
+
$case: 'deltaTableName' as const,
|
|
1265
|
+
deltaTableName: d.delta_table_name,
|
|
1266
|
+
}
|
|
1267
|
+
: undefined,
|
|
1268
|
+
}));
|
|
1269
|
+
|
|
1270
|
+
export const unmarshalBatchCreateMaterializedFeaturesResponseSchema: z.ZodType<BatchCreateMaterializedFeaturesResponse> =
|
|
1271
|
+
z
|
|
1272
|
+
.object({
|
|
1273
|
+
materialized_features: z
|
|
1274
|
+
.array(z.lazy(() => unmarshalMaterializedFeatureSchema))
|
|
1275
|
+
.optional(),
|
|
1276
|
+
})
|
|
1277
|
+
.transform(d => ({
|
|
1278
|
+
materializedFeatures: d.materialized_features,
|
|
1279
|
+
}));
|
|
1280
|
+
|
|
1281
|
+
export const unmarshalColumnIdentifierSchema: z.ZodType<ColumnIdentifier> = z
|
|
1282
|
+
.object({
|
|
1283
|
+
variant_expr_path: z.string().optional(),
|
|
1284
|
+
})
|
|
1285
|
+
.transform(d => ({
|
|
1286
|
+
variantExprPath: d.variant_expr_path,
|
|
1287
|
+
}));
|
|
1288
|
+
|
|
1289
|
+
export const unmarshalColumnSelectionSchema: z.ZodType<ColumnSelection> = z
|
|
1290
|
+
.object({
|
|
1291
|
+
column: z.string().optional(),
|
|
1292
|
+
})
|
|
1293
|
+
.transform(d => ({
|
|
1294
|
+
column: d.column,
|
|
1295
|
+
}));
|
|
1296
|
+
|
|
1297
|
+
export const unmarshalContinuousWindowSchema: z.ZodType<ContinuousWindow> = z
|
|
1298
|
+
.object({
|
|
1299
|
+
window_duration: z
|
|
1300
|
+
.string()
|
|
1301
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1302
|
+
.optional(),
|
|
1303
|
+
offset: z
|
|
1304
|
+
.string()
|
|
1305
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1306
|
+
.optional(),
|
|
1307
|
+
})
|
|
1308
|
+
.transform(d => ({
|
|
1309
|
+
windowDuration: d.window_duration,
|
|
1310
|
+
offset: d.offset,
|
|
1311
|
+
}));
|
|
1312
|
+
|
|
1313
|
+
export const unmarshalCountFunctionSchema: z.ZodType<CountFunction> = z
|
|
1314
|
+
.object({
|
|
1315
|
+
input: z.string().optional(),
|
|
1316
|
+
})
|
|
1317
|
+
.transform(d => ({
|
|
1318
|
+
input: d.input,
|
|
1319
|
+
}));
|
|
1320
|
+
|
|
1321
|
+
export const unmarshalCronScheduleSchema: z.ZodType<CronSchedule> = z
|
|
1322
|
+
.object({
|
|
1323
|
+
cron_expression: z.string().optional(),
|
|
1324
|
+
})
|
|
1325
|
+
.transform(d => ({
|
|
1326
|
+
cronExpression: d.cron_expression,
|
|
1327
|
+
}));
|
|
1328
|
+
|
|
1329
|
+
export const unmarshalDataSourceSchema: z.ZodType<DataSource> = z
|
|
1330
|
+
.object({
|
|
1331
|
+
delta_table_source: z
|
|
1332
|
+
.lazy(() => unmarshalDeltaTableSourceSchema)
|
|
1333
|
+
.optional(),
|
|
1334
|
+
kafka_source: z.lazy(() => unmarshalKafkaSourceSchema).optional(),
|
|
1335
|
+
request_source: z.lazy(() => unmarshalRequestSourceSchema).optional(),
|
|
1336
|
+
})
|
|
1337
|
+
.transform(d => ({
|
|
1338
|
+
dataSource:
|
|
1339
|
+
d.delta_table_source !== undefined
|
|
1340
|
+
? {
|
|
1341
|
+
$case: 'deltaTableSource' as const,
|
|
1342
|
+
deltaTableSource: d.delta_table_source,
|
|
1343
|
+
}
|
|
1344
|
+
: d.kafka_source !== undefined
|
|
1345
|
+
? {$case: 'kafkaSource' as const, kafkaSource: d.kafka_source}
|
|
1346
|
+
: d.request_source !== undefined
|
|
1347
|
+
? {$case: 'requestSource' as const, requestSource: d.request_source}
|
|
1348
|
+
: undefined,
|
|
1349
|
+
}));
|
|
1350
|
+
|
|
1351
|
+
export const unmarshalDeltaTableSourceSchema: z.ZodType<DeltaTableSource> = z
|
|
1352
|
+
.object({
|
|
1353
|
+
full_name: z.string().optional(),
|
|
1354
|
+
entity_columns: z.array(z.string()).optional(),
|
|
1355
|
+
timeseries_column: z.string().optional(),
|
|
1356
|
+
filter_condition: z.string().optional(),
|
|
1357
|
+
transformation_sql: z.string().optional(),
|
|
1358
|
+
dataframe_schema: z.string().optional(),
|
|
1359
|
+
})
|
|
1360
|
+
.transform(d => ({
|
|
1361
|
+
fullName: d.full_name,
|
|
1362
|
+
entityColumns: d.entity_columns,
|
|
1363
|
+
timeseriesColumn: d.timeseries_column,
|
|
1364
|
+
filterCondition: d.filter_condition,
|
|
1365
|
+
transformationSql: d.transformation_sql,
|
|
1366
|
+
dataframeSchema: d.dataframe_schema,
|
|
1367
|
+
}));
|
|
1368
|
+
|
|
1369
|
+
export const unmarshalDirectMtlsConfigSchema: z.ZodType<DirectMtlsConfig> = z
|
|
1370
|
+
.object({
|
|
1371
|
+
bootstrap_servers: z.string().optional(),
|
|
1372
|
+
mtls_config: z.lazy(() => unmarshalMtlsConfigSchema).optional(),
|
|
1373
|
+
})
|
|
1374
|
+
.transform(d => ({
|
|
1375
|
+
bootstrapServers: d.bootstrap_servers,
|
|
1376
|
+
mtlsConfig: d.mtls_config,
|
|
1377
|
+
}));
|
|
1378
|
+
|
|
1379
|
+
export const unmarshalDirectSchemasSchema: z.ZodType<DirectSchemas> = z
|
|
1380
|
+
.object({
|
|
1381
|
+
payload_schema: z.lazy(() => unmarshalSchemaConfigSchema).optional(),
|
|
1382
|
+
key_schema: z.lazy(() => unmarshalSchemaConfigSchema).optional(),
|
|
1383
|
+
})
|
|
1384
|
+
.transform(d => ({
|
|
1385
|
+
payloadSchema: d.payload_schema,
|
|
1386
|
+
keySchema: d.key_schema,
|
|
1387
|
+
}));
|
|
1388
|
+
|
|
1389
|
+
export const unmarshalEntityColumnSchema: z.ZodType<EntityColumn> = z
|
|
1390
|
+
.object({
|
|
1391
|
+
name: z.string().optional(),
|
|
1392
|
+
})
|
|
1393
|
+
.transform(d => ({
|
|
1394
|
+
name: d.name,
|
|
1395
|
+
}));
|
|
1396
|
+
|
|
1397
|
+
export const unmarshalFeatureSchema: z.ZodType<Feature> = z
|
|
1398
|
+
.object({
|
|
1399
|
+
full_name: z.string().optional(),
|
|
1400
|
+
source: z.lazy(() => unmarshalDataSourceSchema).optional(),
|
|
1401
|
+
inputs: z.array(z.string()).optional(),
|
|
1402
|
+
function: z.lazy(() => unmarshalFunctionSchema).optional(),
|
|
1403
|
+
time_window: z.lazy(() => unmarshalTimeWindowSchema).optional(),
|
|
1404
|
+
description: z.string().optional(),
|
|
1405
|
+
filter_condition: z.string().optional(),
|
|
1406
|
+
lineage_context: z.lazy(() => unmarshalLineageContextSchema).optional(),
|
|
1407
|
+
entities: z.array(z.lazy(() => unmarshalEntityColumnSchema)).optional(),
|
|
1408
|
+
timeseries_column: z.lazy(() => unmarshalTimeseriesColumnSchema).optional(),
|
|
1409
|
+
catalog_name: z.string().optional(),
|
|
1410
|
+
schema_name: z.string().optional(),
|
|
1411
|
+
name: z.string().optional(),
|
|
1412
|
+
created_at: z
|
|
1413
|
+
.string()
|
|
1414
|
+
.transform(s => Temporal.Instant.from(s))
|
|
1415
|
+
.optional(),
|
|
1416
|
+
created_by: z.string().optional(),
|
|
1417
|
+
})
|
|
1418
|
+
.transform(d => ({
|
|
1419
|
+
fullName: d.full_name,
|
|
1420
|
+
source: d.source,
|
|
1421
|
+
inputs: d.inputs,
|
|
1422
|
+
function: d.function,
|
|
1423
|
+
timeWindow: d.time_window,
|
|
1424
|
+
description: d.description,
|
|
1425
|
+
filterCondition: d.filter_condition,
|
|
1426
|
+
lineageContext: d.lineage_context,
|
|
1427
|
+
entities: d.entities,
|
|
1428
|
+
timeseriesColumn: d.timeseries_column,
|
|
1429
|
+
catalogName: d.catalog_name,
|
|
1430
|
+
schemaName: d.schema_name,
|
|
1431
|
+
name: d.name,
|
|
1432
|
+
createdAt: d.created_at,
|
|
1433
|
+
createdBy: d.created_by,
|
|
1434
|
+
}));
|
|
1435
|
+
|
|
1436
|
+
export const unmarshalFieldDefinitionSchema: z.ZodType<FieldDefinition> = z
|
|
1437
|
+
.object({
|
|
1438
|
+
name: z.string().optional(),
|
|
1439
|
+
data_type: z.enum(ScalarDataType).optional(),
|
|
1440
|
+
})
|
|
1441
|
+
.transform(d => ({
|
|
1442
|
+
name: d.name,
|
|
1443
|
+
dataType: d.data_type,
|
|
1444
|
+
}));
|
|
1445
|
+
|
|
1446
|
+
export const unmarshalFirstFunctionSchema: z.ZodType<FirstFunction> = z
|
|
1447
|
+
.object({
|
|
1448
|
+
input: z.string().optional(),
|
|
1449
|
+
})
|
|
1450
|
+
.transform(d => ({
|
|
1451
|
+
input: d.input,
|
|
1452
|
+
}));
|
|
1453
|
+
|
|
1454
|
+
export const unmarshalFlatSchemaSchema: z.ZodType<FlatSchema> = z
|
|
1455
|
+
.object({
|
|
1456
|
+
fields: z.array(z.lazy(() => unmarshalFieldDefinitionSchema)).optional(),
|
|
1457
|
+
})
|
|
1458
|
+
.transform(d => ({
|
|
1459
|
+
fields: d.fields,
|
|
1460
|
+
}));
|
|
1461
|
+
|
|
1462
|
+
export const unmarshalFunctionSchema: z.ZodType<Function> = z
|
|
1463
|
+
.object({
|
|
1464
|
+
function_type: z.enum(Function_FunctionType).optional(),
|
|
1465
|
+
extra_parameters: z
|
|
1466
|
+
.array(z.lazy(() => unmarshalFunction_ExtraParameterSchema))
|
|
1467
|
+
.optional(),
|
|
1468
|
+
aggregation_function: z
|
|
1469
|
+
.lazy(() => unmarshalAggregationFunctionSchema)
|
|
1470
|
+
.optional(),
|
|
1471
|
+
column_selection: z.lazy(() => unmarshalColumnSelectionSchema).optional(),
|
|
1472
|
+
})
|
|
1473
|
+
.transform(d => ({
|
|
1474
|
+
functionType: d.function_type,
|
|
1475
|
+
extraParameters: d.extra_parameters,
|
|
1476
|
+
function:
|
|
1477
|
+
d.aggregation_function !== undefined
|
|
1478
|
+
? {
|
|
1479
|
+
$case: 'aggregationFunction' as const,
|
|
1480
|
+
aggregationFunction: d.aggregation_function,
|
|
1481
|
+
}
|
|
1482
|
+
: d.column_selection !== undefined
|
|
1483
|
+
? {
|
|
1484
|
+
$case: 'columnSelection' as const,
|
|
1485
|
+
columnSelection: d.column_selection,
|
|
1486
|
+
}
|
|
1487
|
+
: undefined,
|
|
1488
|
+
}));
|
|
1489
|
+
|
|
1490
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
1491
|
+
export const unmarshalFunction_ExtraParameterSchema: z.ZodType<Function_ExtraParameter> =
|
|
1492
|
+
z
|
|
1493
|
+
.object({
|
|
1494
|
+
key: z.string().optional(),
|
|
1495
|
+
value: z.string().optional(),
|
|
1496
|
+
})
|
|
1497
|
+
.transform(d => ({
|
|
1498
|
+
key: d.key,
|
|
1499
|
+
value: d.value,
|
|
1500
|
+
}));
|
|
1501
|
+
|
|
1502
|
+
export const unmarshalIngestionConfigSchema: z.ZodType<IngestionConfig> = z
|
|
1503
|
+
.object({
|
|
1504
|
+
ingestion_destination: z
|
|
1505
|
+
.lazy(() => unmarshalIngestionDestinationSchema)
|
|
1506
|
+
.optional(),
|
|
1507
|
+
backfill_source: z.lazy(() => unmarshalBackfillSourceSchema).optional(),
|
|
1508
|
+
deduplication_columns: z.array(z.string()).optional(),
|
|
1509
|
+
ingestion_pipeline_id: z.string().optional(),
|
|
1510
|
+
ingestion_job_id: z
|
|
1511
|
+
.union([z.number(), z.bigint()])
|
|
1512
|
+
.transform(v => BigInt(v))
|
|
1513
|
+
.optional(),
|
|
1514
|
+
backfill_job_id: z
|
|
1515
|
+
.union([z.number(), z.bigint()])
|
|
1516
|
+
.transform(v => BigInt(v))
|
|
1517
|
+
.optional(),
|
|
1518
|
+
})
|
|
1519
|
+
.transform(d => ({
|
|
1520
|
+
ingestionDestination: d.ingestion_destination,
|
|
1521
|
+
backfillSource: d.backfill_source,
|
|
1522
|
+
deduplicationColumns: d.deduplication_columns,
|
|
1523
|
+
ingestionPipelineId: d.ingestion_pipeline_id,
|
|
1524
|
+
ingestionJobId: d.ingestion_job_id,
|
|
1525
|
+
backfillJobId: d.backfill_job_id,
|
|
1526
|
+
}));
|
|
1527
|
+
|
|
1528
|
+
export const unmarshalIngestionDestinationSchema: z.ZodType<IngestionDestination> =
|
|
1529
|
+
z
|
|
1530
|
+
.object({
|
|
1531
|
+
delta_table_name: z.string().optional(),
|
|
1532
|
+
})
|
|
1533
|
+
.transform(d => ({
|
|
1534
|
+
ingestionDestination:
|
|
1535
|
+
d.delta_table_name !== undefined
|
|
1536
|
+
? {
|
|
1537
|
+
$case: 'deltaTableName' as const,
|
|
1538
|
+
deltaTableName: d.delta_table_name,
|
|
1539
|
+
}
|
|
1540
|
+
: undefined,
|
|
1541
|
+
}));
|
|
1542
|
+
|
|
1543
|
+
export const unmarshalJobContextSchema: z.ZodType<JobContext> = z
|
|
1544
|
+
.object({
|
|
1545
|
+
job_id: z
|
|
1546
|
+
.union([z.number(), z.bigint()])
|
|
1547
|
+
.transform(v => BigInt(v))
|
|
1548
|
+
.optional(),
|
|
1549
|
+
job_run_id: z
|
|
1550
|
+
.union([z.number(), z.bigint()])
|
|
1551
|
+
.transform(v => BigInt(v))
|
|
1552
|
+
.optional(),
|
|
1553
|
+
})
|
|
1554
|
+
.transform(d => ({
|
|
1555
|
+
jobId: d.job_id,
|
|
1556
|
+
jobRunId: d.job_run_id,
|
|
1557
|
+
}));
|
|
1558
|
+
|
|
1559
|
+
export const unmarshalKafkaConfigSchema: z.ZodType<KafkaConfig> = z
|
|
1560
|
+
.object({
|
|
1561
|
+
name: z.string().optional(),
|
|
1562
|
+
bootstrap_servers: z.string().optional(),
|
|
1563
|
+
subscription_mode: z.lazy(() => unmarshalSubscriptionModeSchema).optional(),
|
|
1564
|
+
auth_config: z.lazy(() => unmarshalAuthConfigSchema).optional(),
|
|
1565
|
+
key_schema: z.lazy(() => unmarshalSchemaConfigSchema).optional(),
|
|
1566
|
+
value_schema: z.lazy(() => unmarshalSchemaConfigSchema).optional(),
|
|
1567
|
+
extra_options: z.record(z.string(), z.string()).optional(),
|
|
1568
|
+
backfill_source: z.lazy(() => unmarshalBackfillSourceSchema).optional(),
|
|
1569
|
+
})
|
|
1570
|
+
.transform(d => ({
|
|
1571
|
+
name: d.name,
|
|
1572
|
+
bootstrapServers: d.bootstrap_servers,
|
|
1573
|
+
subscriptionMode: d.subscription_mode,
|
|
1574
|
+
authConfig: d.auth_config,
|
|
1575
|
+
keySchema: d.key_schema,
|
|
1576
|
+
valueSchema: d.value_schema,
|
|
1577
|
+
extraOptions: d.extra_options,
|
|
1578
|
+
backfillSource: d.backfill_source,
|
|
1579
|
+
}));
|
|
1580
|
+
|
|
1581
|
+
export const unmarshalKafkaSourceSchema: z.ZodType<KafkaSource> = z
|
|
1582
|
+
.object({
|
|
1583
|
+
name: z.string().optional(),
|
|
1584
|
+
entity_column_identifiers: z
|
|
1585
|
+
.array(z.lazy(() => unmarshalColumnIdentifierSchema))
|
|
1586
|
+
.optional(),
|
|
1587
|
+
timeseries_column_identifier: z
|
|
1588
|
+
.lazy(() => unmarshalColumnIdentifierSchema)
|
|
1589
|
+
.optional(),
|
|
1590
|
+
filter_condition: z.string().optional(),
|
|
1591
|
+
})
|
|
1592
|
+
.transform(d => ({
|
|
1593
|
+
name: d.name,
|
|
1594
|
+
entityColumnIdentifiers: d.entity_column_identifiers,
|
|
1595
|
+
timeseriesColumnIdentifier: d.timeseries_column_identifier,
|
|
1596
|
+
filterCondition: d.filter_condition,
|
|
1597
|
+
}));
|
|
1598
|
+
|
|
1599
|
+
export const unmarshalKafkaStreamConfigSchema: z.ZodType<KafkaStreamConfig> = z
|
|
1600
|
+
.object({
|
|
1601
|
+
subscription_mode: z
|
|
1602
|
+
.lazy(() => unmarshalKafkaSubscriptionModeSchema)
|
|
1603
|
+
.optional(),
|
|
1604
|
+
extra_options: z.record(z.string(), z.string()).optional(),
|
|
1605
|
+
})
|
|
1606
|
+
.transform(d => ({
|
|
1607
|
+
subscriptionMode: d.subscription_mode,
|
|
1608
|
+
extraOptions: d.extra_options,
|
|
1609
|
+
}));
|
|
1610
|
+
|
|
1611
|
+
export const unmarshalKafkaSubscriptionModeSchema: z.ZodType<KafkaSubscriptionMode> =
|
|
1612
|
+
z
|
|
1613
|
+
.object({
|
|
1614
|
+
assign: z.string().optional(),
|
|
1615
|
+
subscribe: z.string().optional(),
|
|
1616
|
+
subscribe_pattern: z.string().optional(),
|
|
1617
|
+
})
|
|
1618
|
+
.transform(d => ({
|
|
1619
|
+
subscriptionMode:
|
|
1620
|
+
d.assign !== undefined
|
|
1621
|
+
? {$case: 'assign' as const, assign: d.assign}
|
|
1622
|
+
: d.subscribe !== undefined
|
|
1623
|
+
? {$case: 'subscribe' as const, subscribe: d.subscribe}
|
|
1624
|
+
: d.subscribe_pattern !== undefined
|
|
1625
|
+
? {
|
|
1626
|
+
$case: 'subscribePattern' as const,
|
|
1627
|
+
subscribePattern: d.subscribe_pattern,
|
|
1628
|
+
}
|
|
1629
|
+
: undefined,
|
|
1630
|
+
}));
|
|
1631
|
+
|
|
1632
|
+
export const unmarshalLastFunctionSchema: z.ZodType<LastFunction> = z
|
|
1633
|
+
.object({
|
|
1634
|
+
input: z.string().optional(),
|
|
1635
|
+
})
|
|
1636
|
+
.transform(d => ({
|
|
1637
|
+
input: d.input,
|
|
1638
|
+
}));
|
|
1639
|
+
|
|
1640
|
+
export const unmarshalLineageContextSchema: z.ZodType<LineageContext> = z
|
|
1641
|
+
.object({
|
|
1642
|
+
notebook_id: z
|
|
1643
|
+
.union([z.number(), z.bigint()])
|
|
1644
|
+
.transform(v => BigInt(v))
|
|
1645
|
+
.optional(),
|
|
1646
|
+
job_context: z.lazy(() => unmarshalJobContextSchema).optional(),
|
|
1647
|
+
})
|
|
1648
|
+
.transform(d => ({
|
|
1649
|
+
notebookId: d.notebook_id,
|
|
1650
|
+
jobContext: d.job_context,
|
|
1651
|
+
}));
|
|
1652
|
+
|
|
1653
|
+
export const unmarshalListFeaturesResponseSchema: z.ZodType<ListFeaturesResponse> =
|
|
1654
|
+
z
|
|
1655
|
+
.object({
|
|
1656
|
+
features: z.array(z.lazy(() => unmarshalFeatureSchema)).optional(),
|
|
1657
|
+
next_page_token: z.string().optional(),
|
|
1658
|
+
})
|
|
1659
|
+
.transform(d => ({
|
|
1660
|
+
features: d.features,
|
|
1661
|
+
nextPageToken: d.next_page_token,
|
|
1662
|
+
}));
|
|
1663
|
+
|
|
1664
|
+
export const unmarshalListKafkaConfigsResponseSchema: z.ZodType<ListKafkaConfigsResponse> =
|
|
1665
|
+
z
|
|
1666
|
+
.object({
|
|
1667
|
+
kafka_configs: z
|
|
1668
|
+
.array(z.lazy(() => unmarshalKafkaConfigSchema))
|
|
1669
|
+
.optional(),
|
|
1670
|
+
next_page_token: z.string().optional(),
|
|
1671
|
+
})
|
|
1672
|
+
.transform(d => ({
|
|
1673
|
+
kafkaConfigs: d.kafka_configs,
|
|
1674
|
+
nextPageToken: d.next_page_token,
|
|
1675
|
+
}));
|
|
1676
|
+
|
|
1677
|
+
export const unmarshalListMaterializedFeaturesResponseSchema: z.ZodType<ListMaterializedFeaturesResponse> =
|
|
1678
|
+
z
|
|
1679
|
+
.object({
|
|
1680
|
+
materialized_features: z
|
|
1681
|
+
.array(z.lazy(() => unmarshalMaterializedFeatureSchema))
|
|
1682
|
+
.optional(),
|
|
1683
|
+
next_page_token: z.string().optional(),
|
|
1684
|
+
})
|
|
1685
|
+
.transform(d => ({
|
|
1686
|
+
materializedFeatures: d.materialized_features,
|
|
1687
|
+
nextPageToken: d.next_page_token,
|
|
1688
|
+
}));
|
|
1689
|
+
|
|
1690
|
+
export const unmarshalListStreamsResponseSchema: z.ZodType<ListStreamsResponse> =
|
|
1691
|
+
z
|
|
1692
|
+
.object({
|
|
1693
|
+
streams: z.array(z.lazy(() => unmarshalStreamSchema)).optional(),
|
|
1694
|
+
next_page_token: z.string().optional(),
|
|
1695
|
+
})
|
|
1696
|
+
.transform(d => ({
|
|
1697
|
+
streams: d.streams,
|
|
1698
|
+
nextPageToken: d.next_page_token,
|
|
1699
|
+
}));
|
|
1700
|
+
|
|
1701
|
+
export const unmarshalMaterializedFeatureSchema: z.ZodType<MaterializedFeature> =
|
|
1702
|
+
z
|
|
1703
|
+
.object({
|
|
1704
|
+
materialized_feature_id: z.string().optional(),
|
|
1705
|
+
feature_name: z.string().optional(),
|
|
1706
|
+
offline_store_config: z
|
|
1707
|
+
.lazy(() => unmarshalOfflineStoreConfigSchema)
|
|
1708
|
+
.optional(),
|
|
1709
|
+
online_store_config: z
|
|
1710
|
+
.lazy(() => unmarshalOnlineStoreConfigSchema)
|
|
1711
|
+
.optional(),
|
|
1712
|
+
table_name: z.string().optional(),
|
|
1713
|
+
pipeline_schedule_state: z
|
|
1714
|
+
.enum(MaterializedFeature_PipelineScheduleState)
|
|
1715
|
+
.optional(),
|
|
1716
|
+
last_materialization_time: z
|
|
1717
|
+
.string()
|
|
1718
|
+
.transform(s => Temporal.Instant.from(s))
|
|
1719
|
+
.optional(),
|
|
1720
|
+
cron_schedule: z.string().optional(),
|
|
1721
|
+
is_online: z.boolean().optional(),
|
|
1722
|
+
cron_schedule_trigger: z
|
|
1723
|
+
.lazy(() => unmarshalCronScheduleSchema)
|
|
1724
|
+
.optional(),
|
|
1725
|
+
table_trigger: z.lazy(() => unmarshalTableTriggerSchema).optional(),
|
|
1726
|
+
streaming_mode: z.lazy(() => unmarshalStreamingModeSchema).optional(),
|
|
1727
|
+
})
|
|
1728
|
+
.transform(d => ({
|
|
1729
|
+
materializedFeatureId: d.materialized_feature_id,
|
|
1730
|
+
featureName: d.feature_name,
|
|
1731
|
+
destination:
|
|
1732
|
+
d.offline_store_config !== undefined
|
|
1733
|
+
? {
|
|
1734
|
+
$case: 'offlineStoreConfig' as const,
|
|
1735
|
+
offlineStoreConfig: d.offline_store_config,
|
|
1736
|
+
}
|
|
1737
|
+
: d.online_store_config !== undefined
|
|
1738
|
+
? {
|
|
1739
|
+
$case: 'onlineStoreConfig' as const,
|
|
1740
|
+
onlineStoreConfig: d.online_store_config,
|
|
1741
|
+
}
|
|
1742
|
+
: undefined,
|
|
1743
|
+
tableName: d.table_name,
|
|
1744
|
+
pipelineScheduleState: d.pipeline_schedule_state,
|
|
1745
|
+
lastMaterializationTime: d.last_materialization_time,
|
|
1746
|
+
cronSchedule: d.cron_schedule,
|
|
1747
|
+
isOnline: d.is_online,
|
|
1748
|
+
trigger:
|
|
1749
|
+
d.cron_schedule_trigger !== undefined
|
|
1750
|
+
? {
|
|
1751
|
+
$case: 'cronScheduleTrigger' as const,
|
|
1752
|
+
cronScheduleTrigger: d.cron_schedule_trigger,
|
|
1753
|
+
}
|
|
1754
|
+
: d.table_trigger !== undefined
|
|
1755
|
+
? {$case: 'tableTrigger' as const, tableTrigger: d.table_trigger}
|
|
1756
|
+
: d.streaming_mode !== undefined
|
|
1757
|
+
? {
|
|
1758
|
+
$case: 'streamingMode' as const,
|
|
1759
|
+
streamingMode: d.streaming_mode,
|
|
1760
|
+
}
|
|
1761
|
+
: undefined,
|
|
1762
|
+
}));
|
|
1763
|
+
|
|
1764
|
+
export const unmarshalMaxFunctionSchema: z.ZodType<MaxFunction> = z
|
|
1765
|
+
.object({
|
|
1766
|
+
input: z.string().optional(),
|
|
1767
|
+
})
|
|
1768
|
+
.transform(d => ({
|
|
1769
|
+
input: d.input,
|
|
1770
|
+
}));
|
|
1771
|
+
|
|
1772
|
+
export const unmarshalMinFunctionSchema: z.ZodType<MinFunction> = z
|
|
1773
|
+
.object({
|
|
1774
|
+
input: z.string().optional(),
|
|
1775
|
+
})
|
|
1776
|
+
.transform(d => ({
|
|
1777
|
+
input: d.input,
|
|
1778
|
+
}));
|
|
1779
|
+
|
|
1780
|
+
export const unmarshalMtlsConfigSchema: z.ZodType<MtlsConfig> = z
|
|
1781
|
+
.object({
|
|
1782
|
+
keystore_location: z.string().optional(),
|
|
1783
|
+
keystore_password_ref: z
|
|
1784
|
+
.lazy(() => unmarshalSecretScopeReferenceSchema)
|
|
1785
|
+
.optional(),
|
|
1786
|
+
key_password_ref: z
|
|
1787
|
+
.lazy(() => unmarshalSecretScopeReferenceSchema)
|
|
1788
|
+
.optional(),
|
|
1789
|
+
truststore_location: z.string().optional(),
|
|
1790
|
+
truststore_password_ref: z
|
|
1791
|
+
.lazy(() => unmarshalSecretScopeReferenceSchema)
|
|
1792
|
+
.optional(),
|
|
1793
|
+
disable_hostname_verification: z.boolean().optional(),
|
|
1794
|
+
})
|
|
1795
|
+
.transform(d => ({
|
|
1796
|
+
keystoreLocation: d.keystore_location,
|
|
1797
|
+
keystorePasswordRef: d.keystore_password_ref,
|
|
1798
|
+
keyPasswordRef: d.key_password_ref,
|
|
1799
|
+
truststoreLocation: d.truststore_location,
|
|
1800
|
+
truststorePasswordRef: d.truststore_password_ref,
|
|
1801
|
+
disableHostnameVerification: d.disable_hostname_verification,
|
|
1802
|
+
}));
|
|
1803
|
+
|
|
1804
|
+
export const unmarshalOfflineStoreConfigSchema: z.ZodType<OfflineStoreConfig> =
|
|
1805
|
+
z
|
|
1806
|
+
.object({
|
|
1807
|
+
catalog_name: z.string().optional(),
|
|
1808
|
+
schema_name: z.string().optional(),
|
|
1809
|
+
table_name_prefix: z.string().optional(),
|
|
1810
|
+
})
|
|
1811
|
+
.transform(d => ({
|
|
1812
|
+
catalogName: d.catalog_name,
|
|
1813
|
+
schemaName: d.schema_name,
|
|
1814
|
+
tableNamePrefix: d.table_name_prefix,
|
|
1815
|
+
}));
|
|
1816
|
+
|
|
1817
|
+
export const unmarshalOnlineStoreConfigSchema: z.ZodType<OnlineStoreConfig> = z
|
|
1818
|
+
.object({
|
|
1819
|
+
catalog_name: z.string().optional(),
|
|
1820
|
+
schema_name: z.string().optional(),
|
|
1821
|
+
table_name_prefix: z.string().optional(),
|
|
1822
|
+
online_store_name: z.string().optional(),
|
|
1823
|
+
})
|
|
1824
|
+
.transform(d => ({
|
|
1825
|
+
catalogName: d.catalog_name,
|
|
1826
|
+
schemaName: d.schema_name,
|
|
1827
|
+
tableNamePrefix: d.table_name_prefix,
|
|
1828
|
+
onlineStoreName: d.online_store_name,
|
|
1829
|
+
}));
|
|
1830
|
+
|
|
1831
|
+
export const unmarshalRequestSourceSchema: z.ZodType<RequestSource> = z
|
|
1832
|
+
.object({
|
|
1833
|
+
flat_schema: z.lazy(() => unmarshalFlatSchemaSchema).optional(),
|
|
1834
|
+
})
|
|
1835
|
+
.transform(d => ({
|
|
1836
|
+
schema:
|
|
1837
|
+
d.flat_schema !== undefined
|
|
1838
|
+
? {$case: 'flatSchema' as const, flatSchema: d.flat_schema}
|
|
1839
|
+
: undefined,
|
|
1840
|
+
}));
|
|
1841
|
+
|
|
1842
|
+
export const unmarshalRollingWindowSchema: z.ZodType<RollingWindow> = z
|
|
1843
|
+
.object({
|
|
1844
|
+
window_duration: z
|
|
1845
|
+
.string()
|
|
1846
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1847
|
+
.optional(),
|
|
1848
|
+
delay: z
|
|
1849
|
+
.string()
|
|
1850
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1851
|
+
.optional(),
|
|
1852
|
+
})
|
|
1853
|
+
.transform(d => ({
|
|
1854
|
+
windowDuration: d.window_duration,
|
|
1855
|
+
delay: d.delay,
|
|
1856
|
+
}));
|
|
1857
|
+
|
|
1858
|
+
export const unmarshalSchemaConfigSchema: z.ZodType<SchemaConfig> = z
|
|
1859
|
+
.object({
|
|
1860
|
+
json_schema: z.string().optional(),
|
|
1861
|
+
})
|
|
1862
|
+
.transform(d => ({
|
|
1863
|
+
schema:
|
|
1864
|
+
d.json_schema !== undefined
|
|
1865
|
+
? {$case: 'jsonSchema' as const, jsonSchema: d.json_schema}
|
|
1866
|
+
: undefined,
|
|
1867
|
+
}));
|
|
1868
|
+
|
|
1869
|
+
export const unmarshalSecretScopeReferenceSchema: z.ZodType<SecretScopeReference> =
|
|
1870
|
+
z
|
|
1871
|
+
.object({
|
|
1872
|
+
scope: z.string().optional(),
|
|
1873
|
+
key: z.string().optional(),
|
|
1874
|
+
})
|
|
1875
|
+
.transform(d => ({
|
|
1876
|
+
scope: d.scope,
|
|
1877
|
+
key: d.key,
|
|
1878
|
+
}));
|
|
1879
|
+
|
|
1880
|
+
export const unmarshalSlidingWindowSchema: z.ZodType<SlidingWindow> = z
|
|
1881
|
+
.object({
|
|
1882
|
+
window_duration: z
|
|
1883
|
+
.string()
|
|
1884
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1885
|
+
.optional(),
|
|
1886
|
+
slide_duration: z
|
|
1887
|
+
.string()
|
|
1888
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
1889
|
+
.optional(),
|
|
1890
|
+
})
|
|
1891
|
+
.transform(d => ({
|
|
1892
|
+
windowDuration: d.window_duration,
|
|
1893
|
+
slideDuration: d.slide_duration,
|
|
1894
|
+
}));
|
|
1895
|
+
|
|
1896
|
+
export const unmarshalStddevPopFunctionSchema: z.ZodType<StddevPopFunction> = z
|
|
1897
|
+
.object({
|
|
1898
|
+
input: z.string().optional(),
|
|
1899
|
+
})
|
|
1900
|
+
.transform(d => ({
|
|
1901
|
+
input: d.input,
|
|
1902
|
+
}));
|
|
1903
|
+
|
|
1904
|
+
export const unmarshalStddevSampFunctionSchema: z.ZodType<StddevSampFunction> =
|
|
1905
|
+
z
|
|
1906
|
+
.object({
|
|
1907
|
+
input: z.string().optional(),
|
|
1908
|
+
})
|
|
1909
|
+
.transform(d => ({
|
|
1910
|
+
input: d.input,
|
|
1911
|
+
}));
|
|
1912
|
+
|
|
1913
|
+
export const unmarshalStreamSchema: z.ZodType<Stream> = z
|
|
1914
|
+
.object({
|
|
1915
|
+
name: z.string().optional(),
|
|
1916
|
+
description: z.string().optional(),
|
|
1917
|
+
source_config: z.lazy(() => unmarshalStreamSourceConfigSchema).optional(),
|
|
1918
|
+
connection_config: z
|
|
1919
|
+
.lazy(() => unmarshalStreamConnectionConfigSchema)
|
|
1920
|
+
.optional(),
|
|
1921
|
+
schema_config: z.lazy(() => unmarshalStreamSchemaConfigSchema).optional(),
|
|
1922
|
+
ingestion_config: z.lazy(() => unmarshalIngestionConfigSchema).optional(),
|
|
1923
|
+
create_time: z
|
|
1924
|
+
.string()
|
|
1925
|
+
.transform(s => Temporal.Instant.from(s))
|
|
1926
|
+
.optional(),
|
|
1927
|
+
created_by: z.string().optional(),
|
|
1928
|
+
update_time: z
|
|
1929
|
+
.string()
|
|
1930
|
+
.transform(s => Temporal.Instant.from(s))
|
|
1931
|
+
.optional(),
|
|
1932
|
+
updated_by: z.string().optional(),
|
|
1933
|
+
browse_only: z.boolean().optional(),
|
|
1934
|
+
})
|
|
1935
|
+
.transform(d => ({
|
|
1936
|
+
name: d.name,
|
|
1937
|
+
description: d.description,
|
|
1938
|
+
sourceConfig: d.source_config,
|
|
1939
|
+
connectionConfig: d.connection_config,
|
|
1940
|
+
schemaConfig: d.schema_config,
|
|
1941
|
+
ingestionConfig: d.ingestion_config,
|
|
1942
|
+
createTime: d.create_time,
|
|
1943
|
+
createdBy: d.created_by,
|
|
1944
|
+
updateTime: d.update_time,
|
|
1945
|
+
updatedBy: d.updated_by,
|
|
1946
|
+
browseOnly: d.browse_only,
|
|
1947
|
+
}));
|
|
1948
|
+
|
|
1949
|
+
export const unmarshalStreamConnectionConfigSchema: z.ZodType<StreamConnectionConfig> =
|
|
1950
|
+
z
|
|
1951
|
+
.object({
|
|
1952
|
+
uc_connection_name: z.string().optional(),
|
|
1953
|
+
direct_mtls_config: z
|
|
1954
|
+
.lazy(() => unmarshalDirectMtlsConfigSchema)
|
|
1955
|
+
.optional(),
|
|
1956
|
+
})
|
|
1957
|
+
.transform(d => ({
|
|
1958
|
+
connectionConfig:
|
|
1959
|
+
d.uc_connection_name !== undefined
|
|
1960
|
+
? {
|
|
1961
|
+
$case: 'ucConnectionName' as const,
|
|
1962
|
+
ucConnectionName: d.uc_connection_name,
|
|
1963
|
+
}
|
|
1964
|
+
: d.direct_mtls_config !== undefined
|
|
1965
|
+
? {
|
|
1966
|
+
$case: 'directMtlsConfig' as const,
|
|
1967
|
+
directMtlsConfig: d.direct_mtls_config,
|
|
1968
|
+
}
|
|
1969
|
+
: undefined,
|
|
1970
|
+
}));
|
|
1971
|
+
|
|
1972
|
+
export const unmarshalStreamSchemaConfigSchema: z.ZodType<StreamSchemaConfig> =
|
|
1973
|
+
z
|
|
1974
|
+
.object({
|
|
1975
|
+
direct_schemas: z.lazy(() => unmarshalDirectSchemasSchema).optional(),
|
|
1976
|
+
})
|
|
1977
|
+
.transform(d => ({
|
|
1978
|
+
schemaConfig:
|
|
1979
|
+
d.direct_schemas !== undefined
|
|
1980
|
+
? {$case: 'directSchemas' as const, directSchemas: d.direct_schemas}
|
|
1981
|
+
: undefined,
|
|
1982
|
+
}));
|
|
1983
|
+
|
|
1984
|
+
export const unmarshalStreamSourceConfigSchema: z.ZodType<StreamSourceConfig> =
|
|
1985
|
+
z
|
|
1986
|
+
.object({
|
|
1987
|
+
kafka_stream_config: z
|
|
1988
|
+
.lazy(() => unmarshalKafkaStreamConfigSchema)
|
|
1989
|
+
.optional(),
|
|
1990
|
+
})
|
|
1991
|
+
.transform(d => ({
|
|
1992
|
+
sourceConfig:
|
|
1993
|
+
d.kafka_stream_config !== undefined
|
|
1994
|
+
? {
|
|
1995
|
+
$case: 'kafkaStreamConfig' as const,
|
|
1996
|
+
kafkaStreamConfig: d.kafka_stream_config,
|
|
1997
|
+
}
|
|
1998
|
+
: undefined,
|
|
1999
|
+
}));
|
|
2000
|
+
|
|
2001
|
+
export const unmarshalStreamingModeSchema: z.ZodType<StreamingMode> = z
|
|
2002
|
+
.object({
|
|
2003
|
+
mode: z.enum(StreamingMode_StreamingModeType).optional(),
|
|
2004
|
+
})
|
|
2005
|
+
.transform(d => ({
|
|
2006
|
+
mode: d.mode,
|
|
2007
|
+
}));
|
|
2008
|
+
|
|
2009
|
+
export const unmarshalSubscriptionModeSchema: z.ZodType<SubscriptionMode> = z
|
|
2010
|
+
.object({
|
|
2011
|
+
assign: z.string().optional(),
|
|
2012
|
+
subscribe: z.string().optional(),
|
|
2013
|
+
subscribe_pattern: z.string().optional(),
|
|
2014
|
+
})
|
|
2015
|
+
.transform(d => ({
|
|
2016
|
+
subscriptionMode:
|
|
2017
|
+
d.assign !== undefined
|
|
2018
|
+
? {$case: 'assign' as const, assign: d.assign}
|
|
2019
|
+
: d.subscribe !== undefined
|
|
2020
|
+
? {$case: 'subscribe' as const, subscribe: d.subscribe}
|
|
2021
|
+
: d.subscribe_pattern !== undefined
|
|
2022
|
+
? {
|
|
2023
|
+
$case: 'subscribePattern' as const,
|
|
2024
|
+
subscribePattern: d.subscribe_pattern,
|
|
2025
|
+
}
|
|
2026
|
+
: undefined,
|
|
2027
|
+
}));
|
|
2028
|
+
|
|
2029
|
+
export const unmarshalSumFunctionSchema: z.ZodType<SumFunction> = z
|
|
2030
|
+
.object({
|
|
2031
|
+
input: z.string().optional(),
|
|
2032
|
+
})
|
|
2033
|
+
.transform(d => ({
|
|
2034
|
+
input: d.input,
|
|
2035
|
+
}));
|
|
2036
|
+
|
|
2037
|
+
export const unmarshalTableTriggerSchema: z.ZodType<TableTrigger> = z.object(
|
|
2038
|
+
{}
|
|
2039
|
+
);
|
|
2040
|
+
|
|
2041
|
+
export const unmarshalTimeWindowSchema: z.ZodType<TimeWindow> = z
|
|
2042
|
+
.object({
|
|
2043
|
+
continuous: z.lazy(() => unmarshalContinuousWindowSchema).optional(),
|
|
2044
|
+
tumbling: z.lazy(() => unmarshalTumblingWindowSchema).optional(),
|
|
2045
|
+
sliding: z.lazy(() => unmarshalSlidingWindowSchema).optional(),
|
|
2046
|
+
rolling: z.lazy(() => unmarshalRollingWindowSchema).optional(),
|
|
2047
|
+
})
|
|
2048
|
+
.transform(d => ({
|
|
2049
|
+
windowType:
|
|
2050
|
+
d.continuous !== undefined
|
|
2051
|
+
? {$case: 'continuous' as const, continuous: d.continuous}
|
|
2052
|
+
: d.tumbling !== undefined
|
|
2053
|
+
? {$case: 'tumbling' as const, tumbling: d.tumbling}
|
|
2054
|
+
: d.sliding !== undefined
|
|
2055
|
+
? {$case: 'sliding' as const, sliding: d.sliding}
|
|
2056
|
+
: d.rolling !== undefined
|
|
2057
|
+
? {$case: 'rolling' as const, rolling: d.rolling}
|
|
2058
|
+
: undefined,
|
|
2059
|
+
}));
|
|
2060
|
+
|
|
2061
|
+
export const unmarshalTimeseriesColumnSchema: z.ZodType<TimeseriesColumn> = z
|
|
2062
|
+
.object({
|
|
2063
|
+
name: z.string().optional(),
|
|
2064
|
+
})
|
|
2065
|
+
.transform(d => ({
|
|
2066
|
+
name: d.name,
|
|
2067
|
+
}));
|
|
2068
|
+
|
|
2069
|
+
export const unmarshalTumblingWindowSchema: z.ZodType<TumblingWindow> = z
|
|
2070
|
+
.object({
|
|
2071
|
+
window_duration: z
|
|
2072
|
+
.string()
|
|
2073
|
+
.transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
|
|
2074
|
+
.optional(),
|
|
2075
|
+
})
|
|
2076
|
+
.transform(d => ({
|
|
2077
|
+
windowDuration: d.window_duration,
|
|
2078
|
+
}));
|
|
2079
|
+
|
|
2080
|
+
export const unmarshalVarPopFunctionSchema: z.ZodType<VarPopFunction> = z
|
|
2081
|
+
.object({
|
|
2082
|
+
input: z.string().optional(),
|
|
2083
|
+
})
|
|
2084
|
+
.transform(d => ({
|
|
2085
|
+
input: d.input,
|
|
2086
|
+
}));
|
|
2087
|
+
|
|
2088
|
+
export const unmarshalVarSampFunctionSchema: z.ZodType<VarSampFunction> = z
|
|
2089
|
+
.object({
|
|
2090
|
+
input: z.string().optional(),
|
|
2091
|
+
})
|
|
2092
|
+
.transform(d => ({
|
|
2093
|
+
input: d.input,
|
|
2094
|
+
}));
|
|
2095
|
+
|
|
2096
|
+
export const marshalAggregationFunctionSchema: z.ZodType = z
|
|
2097
|
+
.object({
|
|
2098
|
+
operation: z
|
|
2099
|
+
.discriminatedUnion('$case', [
|
|
2100
|
+
z.object({
|
|
2101
|
+
$case: z.literal('avg'),
|
|
2102
|
+
avg: z.lazy(() => marshalAvgFunctionSchema),
|
|
2103
|
+
}),
|
|
2104
|
+
z.object({
|
|
2105
|
+
$case: z.literal('countFunction'),
|
|
2106
|
+
countFunction: z.lazy(() => marshalCountFunctionSchema),
|
|
2107
|
+
}),
|
|
2108
|
+
z.object({
|
|
2109
|
+
$case: z.literal('sum'),
|
|
2110
|
+
sum: z.lazy(() => marshalSumFunctionSchema),
|
|
2111
|
+
}),
|
|
2112
|
+
z.object({
|
|
2113
|
+
$case: z.literal('min'),
|
|
2114
|
+
min: z.lazy(() => marshalMinFunctionSchema),
|
|
2115
|
+
}),
|
|
2116
|
+
z.object({
|
|
2117
|
+
$case: z.literal('max'),
|
|
2118
|
+
max: z.lazy(() => marshalMaxFunctionSchema),
|
|
2119
|
+
}),
|
|
2120
|
+
z.object({
|
|
2121
|
+
$case: z.literal('first'),
|
|
2122
|
+
first: z.lazy(() => marshalFirstFunctionSchema),
|
|
2123
|
+
}),
|
|
2124
|
+
z.object({
|
|
2125
|
+
$case: z.literal('last'),
|
|
2126
|
+
last: z.lazy(() => marshalLastFunctionSchema),
|
|
2127
|
+
}),
|
|
2128
|
+
z.object({
|
|
2129
|
+
$case: z.literal('approxCountDistinct'),
|
|
2130
|
+
approxCountDistinct: z.lazy(
|
|
2131
|
+
() => marshalApproxCountDistinctFunctionSchema
|
|
2132
|
+
),
|
|
2133
|
+
}),
|
|
2134
|
+
z.object({
|
|
2135
|
+
$case: z.literal('approxPercentile'),
|
|
2136
|
+
approxPercentile: z.lazy(() => marshalApproxPercentileFunctionSchema),
|
|
2137
|
+
}),
|
|
2138
|
+
z.object({
|
|
2139
|
+
$case: z.literal('stddevPop'),
|
|
2140
|
+
stddevPop: z.lazy(() => marshalStddevPopFunctionSchema),
|
|
2141
|
+
}),
|
|
2142
|
+
z.object({
|
|
2143
|
+
$case: z.literal('stddevSamp'),
|
|
2144
|
+
stddevSamp: z.lazy(() => marshalStddevSampFunctionSchema),
|
|
2145
|
+
}),
|
|
2146
|
+
z.object({
|
|
2147
|
+
$case: z.literal('varPop'),
|
|
2148
|
+
varPop: z.lazy(() => marshalVarPopFunctionSchema),
|
|
2149
|
+
}),
|
|
2150
|
+
z.object({
|
|
2151
|
+
$case: z.literal('varSamp'),
|
|
2152
|
+
varSamp: z.lazy(() => marshalVarSampFunctionSchema),
|
|
2153
|
+
}),
|
|
2154
|
+
])
|
|
2155
|
+
.optional(),
|
|
2156
|
+
timeWindow: z.lazy(() => marshalTimeWindowSchema).optional(),
|
|
2157
|
+
})
|
|
2158
|
+
.transform(d => ({
|
|
2159
|
+
...(d.operation?.$case === 'avg' && {avg: d.operation.avg}),
|
|
2160
|
+
...(d.operation?.$case === 'countFunction' && {
|
|
2161
|
+
count_function: d.operation.countFunction,
|
|
2162
|
+
}),
|
|
2163
|
+
...(d.operation?.$case === 'sum' && {sum: d.operation.sum}),
|
|
2164
|
+
...(d.operation?.$case === 'min' && {min: d.operation.min}),
|
|
2165
|
+
...(d.operation?.$case === 'max' && {max: d.operation.max}),
|
|
2166
|
+
...(d.operation?.$case === 'first' && {first: d.operation.first}),
|
|
2167
|
+
...(d.operation?.$case === 'last' && {last: d.operation.last}),
|
|
2168
|
+
...(d.operation?.$case === 'approxCountDistinct' && {
|
|
2169
|
+
approx_count_distinct: d.operation.approxCountDistinct,
|
|
2170
|
+
}),
|
|
2171
|
+
...(d.operation?.$case === 'approxPercentile' && {
|
|
2172
|
+
approx_percentile: d.operation.approxPercentile,
|
|
2173
|
+
}),
|
|
2174
|
+
...(d.operation?.$case === 'stddevPop' && {
|
|
2175
|
+
stddev_pop: d.operation.stddevPop,
|
|
2176
|
+
}),
|
|
2177
|
+
...(d.operation?.$case === 'stddevSamp' && {
|
|
2178
|
+
stddev_samp: d.operation.stddevSamp,
|
|
2179
|
+
}),
|
|
2180
|
+
...(d.operation?.$case === 'varPop' && {var_pop: d.operation.varPop}),
|
|
2181
|
+
...(d.operation?.$case === 'varSamp' && {var_samp: d.operation.varSamp}),
|
|
2182
|
+
time_window: d.timeWindow,
|
|
2183
|
+
}));
|
|
2184
|
+
|
|
2185
|
+
export const marshalApproxCountDistinctFunctionSchema: z.ZodType = z
|
|
2186
|
+
.object({
|
|
2187
|
+
input: z.string().optional(),
|
|
2188
|
+
relativeSd: z.number().optional(),
|
|
2189
|
+
})
|
|
2190
|
+
.transform(d => ({
|
|
2191
|
+
input: d.input,
|
|
2192
|
+
relative_sd: d.relativeSd,
|
|
2193
|
+
}));
|
|
2194
|
+
|
|
2195
|
+
export const marshalApproxPercentileFunctionSchema: z.ZodType = z
|
|
2196
|
+
.object({
|
|
2197
|
+
input: z.string().optional(),
|
|
2198
|
+
percentile: z.number().optional(),
|
|
2199
|
+
accuracy: z.bigint().optional(),
|
|
2200
|
+
})
|
|
2201
|
+
.transform(d => ({
|
|
2202
|
+
input: d.input,
|
|
2203
|
+
percentile: d.percentile,
|
|
2204
|
+
accuracy: d.accuracy,
|
|
2205
|
+
}));
|
|
2206
|
+
|
|
2207
|
+
export const marshalAuthConfigSchema: z.ZodType = z
|
|
2208
|
+
.object({
|
|
2209
|
+
authConfig: z
|
|
2210
|
+
.discriminatedUnion('$case', [
|
|
2211
|
+
z.object({
|
|
2212
|
+
$case: z.literal('ucServiceCredentialName'),
|
|
2213
|
+
ucServiceCredentialName: z.string(),
|
|
2214
|
+
}),
|
|
2215
|
+
z.object({
|
|
2216
|
+
$case: z.literal('mtlsConfig'),
|
|
2217
|
+
mtlsConfig: z.lazy(() => marshalMtlsConfigSchema),
|
|
2218
|
+
}),
|
|
2219
|
+
])
|
|
2220
|
+
.optional(),
|
|
2221
|
+
})
|
|
2222
|
+
.transform(d => ({
|
|
2223
|
+
...(d.authConfig?.$case === 'ucServiceCredentialName' && {
|
|
2224
|
+
uc_service_credential_name: d.authConfig.ucServiceCredentialName,
|
|
2225
|
+
}),
|
|
2226
|
+
...(d.authConfig?.$case === 'mtlsConfig' && {
|
|
2227
|
+
mtls_config: d.authConfig.mtlsConfig,
|
|
2228
|
+
}),
|
|
2229
|
+
}));
|
|
2230
|
+
|
|
2231
|
+
export const marshalAvgFunctionSchema: z.ZodType = z
|
|
2232
|
+
.object({
|
|
2233
|
+
input: z.string().optional(),
|
|
2234
|
+
})
|
|
2235
|
+
.transform(d => ({
|
|
2236
|
+
input: d.input,
|
|
2237
|
+
}));
|
|
2238
|
+
|
|
2239
|
+
export const marshalBackfillSourceSchema: z.ZodType = z
|
|
2240
|
+
.object({
|
|
2241
|
+
backfillSource: z
|
|
2242
|
+
.discriminatedUnion('$case', [
|
|
2243
|
+
z.object({
|
|
2244
|
+
$case: z.literal('deltaTableSource'),
|
|
2245
|
+
deltaTableSource: z.lazy(() => marshalDeltaTableSourceSchema),
|
|
2246
|
+
}),
|
|
2247
|
+
z.object({
|
|
2248
|
+
$case: z.literal('deltaTableName'),
|
|
2249
|
+
deltaTableName: z.string(),
|
|
2250
|
+
}),
|
|
2251
|
+
])
|
|
2252
|
+
.optional(),
|
|
2253
|
+
})
|
|
2254
|
+
.transform(d => ({
|
|
2255
|
+
...(d.backfillSource?.$case === 'deltaTableSource' && {
|
|
2256
|
+
delta_table_source: d.backfillSource.deltaTableSource,
|
|
2257
|
+
}),
|
|
2258
|
+
...(d.backfillSource?.$case === 'deltaTableName' && {
|
|
2259
|
+
delta_table_name: d.backfillSource.deltaTableName,
|
|
2260
|
+
}),
|
|
2261
|
+
}));
|
|
2262
|
+
|
|
2263
|
+
export const marshalBatchCreateMaterializedFeaturesRequestSchema: z.ZodType = z
|
|
2264
|
+
.object({
|
|
2265
|
+
requests: z
|
|
2266
|
+
.array(z.lazy(() => marshalCreateMaterializedFeatureRequestSchema))
|
|
2267
|
+
.optional(),
|
|
2268
|
+
})
|
|
2269
|
+
.transform(d => ({
|
|
2270
|
+
requests: d.requests,
|
|
2271
|
+
}));
|
|
2272
|
+
|
|
2273
|
+
export const marshalColumnIdentifierSchema: z.ZodType = z
|
|
2274
|
+
.object({
|
|
2275
|
+
variantExprPath: z.string().optional(),
|
|
2276
|
+
})
|
|
2277
|
+
.transform(d => ({
|
|
2278
|
+
variant_expr_path: d.variantExprPath,
|
|
2279
|
+
}));
|
|
2280
|
+
|
|
2281
|
+
export const marshalColumnSelectionSchema: z.ZodType = z
|
|
2282
|
+
.object({
|
|
2283
|
+
column: z.string().optional(),
|
|
2284
|
+
})
|
|
2285
|
+
.transform(d => ({
|
|
2286
|
+
column: d.column,
|
|
2287
|
+
}));
|
|
2288
|
+
|
|
2289
|
+
export const marshalContinuousWindowSchema: z.ZodType = z
|
|
2290
|
+
.object({
|
|
2291
|
+
windowDuration: z
|
|
2292
|
+
.any()
|
|
2293
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2294
|
+
.optional(),
|
|
2295
|
+
offset: z
|
|
2296
|
+
.any()
|
|
2297
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2298
|
+
.optional(),
|
|
2299
|
+
})
|
|
2300
|
+
.transform(d => ({
|
|
2301
|
+
window_duration: d.windowDuration,
|
|
2302
|
+
offset: d.offset,
|
|
2303
|
+
}));
|
|
2304
|
+
|
|
2305
|
+
export const marshalCountFunctionSchema: z.ZodType = z
|
|
2306
|
+
.object({
|
|
2307
|
+
input: z.string().optional(),
|
|
2308
|
+
})
|
|
2309
|
+
.transform(d => ({
|
|
2310
|
+
input: d.input,
|
|
2311
|
+
}));
|
|
2312
|
+
|
|
2313
|
+
export const marshalCreateMaterializedFeatureRequestSchema: z.ZodType = z
|
|
2314
|
+
.object({
|
|
2315
|
+
materializedFeature: z
|
|
2316
|
+
.lazy(() => marshalMaterializedFeatureSchema)
|
|
2317
|
+
.optional(),
|
|
2318
|
+
})
|
|
2319
|
+
.transform(d => ({
|
|
2320
|
+
materialized_feature: d.materializedFeature,
|
|
2321
|
+
}));
|
|
2322
|
+
|
|
2323
|
+
export const marshalCronScheduleSchema: z.ZodType = z
|
|
2324
|
+
.object({
|
|
2325
|
+
cronExpression: z.string().optional(),
|
|
2326
|
+
})
|
|
2327
|
+
.transform(d => ({
|
|
2328
|
+
cron_expression: d.cronExpression,
|
|
2329
|
+
}));
|
|
2330
|
+
|
|
2331
|
+
export const marshalDataSourceSchema: z.ZodType = z
|
|
2332
|
+
.object({
|
|
2333
|
+
dataSource: z
|
|
2334
|
+
.discriminatedUnion('$case', [
|
|
2335
|
+
z.object({
|
|
2336
|
+
$case: z.literal('deltaTableSource'),
|
|
2337
|
+
deltaTableSource: z.lazy(() => marshalDeltaTableSourceSchema),
|
|
2338
|
+
}),
|
|
2339
|
+
z.object({
|
|
2340
|
+
$case: z.literal('kafkaSource'),
|
|
2341
|
+
kafkaSource: z.lazy(() => marshalKafkaSourceSchema),
|
|
2342
|
+
}),
|
|
2343
|
+
z.object({
|
|
2344
|
+
$case: z.literal('requestSource'),
|
|
2345
|
+
requestSource: z.lazy(() => marshalRequestSourceSchema),
|
|
2346
|
+
}),
|
|
2347
|
+
])
|
|
2348
|
+
.optional(),
|
|
2349
|
+
})
|
|
2350
|
+
.transform(d => ({
|
|
2351
|
+
...(d.dataSource?.$case === 'deltaTableSource' && {
|
|
2352
|
+
delta_table_source: d.dataSource.deltaTableSource,
|
|
2353
|
+
}),
|
|
2354
|
+
...(d.dataSource?.$case === 'kafkaSource' && {
|
|
2355
|
+
kafka_source: d.dataSource.kafkaSource,
|
|
2356
|
+
}),
|
|
2357
|
+
...(d.dataSource?.$case === 'requestSource' && {
|
|
2358
|
+
request_source: d.dataSource.requestSource,
|
|
2359
|
+
}),
|
|
2360
|
+
}));
|
|
2361
|
+
|
|
2362
|
+
export const marshalDeltaTableSourceSchema: z.ZodType = z
|
|
2363
|
+
.object({
|
|
2364
|
+
fullName: z.string().optional(),
|
|
2365
|
+
entityColumns: z.array(z.string()).optional(),
|
|
2366
|
+
timeseriesColumn: z.string().optional(),
|
|
2367
|
+
filterCondition: z.string().optional(),
|
|
2368
|
+
transformationSql: z.string().optional(),
|
|
2369
|
+
dataframeSchema: z.string().optional(),
|
|
2370
|
+
})
|
|
2371
|
+
.transform(d => ({
|
|
2372
|
+
full_name: d.fullName,
|
|
2373
|
+
entity_columns: d.entityColumns,
|
|
2374
|
+
timeseries_column: d.timeseriesColumn,
|
|
2375
|
+
filter_condition: d.filterCondition,
|
|
2376
|
+
transformation_sql: d.transformationSql,
|
|
2377
|
+
dataframe_schema: d.dataframeSchema,
|
|
2378
|
+
}));
|
|
2379
|
+
|
|
2380
|
+
export const marshalDirectMtlsConfigSchema: z.ZodType = z
|
|
2381
|
+
.object({
|
|
2382
|
+
bootstrapServers: z.string().optional(),
|
|
2383
|
+
mtlsConfig: z.lazy(() => marshalMtlsConfigSchema).optional(),
|
|
2384
|
+
})
|
|
2385
|
+
.transform(d => ({
|
|
2386
|
+
bootstrap_servers: d.bootstrapServers,
|
|
2387
|
+
mtls_config: d.mtlsConfig,
|
|
2388
|
+
}));
|
|
2389
|
+
|
|
2390
|
+
export const marshalDirectSchemasSchema: z.ZodType = z
|
|
2391
|
+
.object({
|
|
2392
|
+
payloadSchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
|
|
2393
|
+
keySchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
|
|
2394
|
+
})
|
|
2395
|
+
.transform(d => ({
|
|
2396
|
+
payload_schema: d.payloadSchema,
|
|
2397
|
+
key_schema: d.keySchema,
|
|
2398
|
+
}));
|
|
2399
|
+
|
|
2400
|
+
export const marshalEntityColumnSchema: z.ZodType = z
|
|
2401
|
+
.object({
|
|
2402
|
+
name: z.string().optional(),
|
|
2403
|
+
})
|
|
2404
|
+
.transform(d => ({
|
|
2405
|
+
name: d.name,
|
|
2406
|
+
}));
|
|
2407
|
+
|
|
2408
|
+
export const marshalFeatureSchema: z.ZodType = z
|
|
2409
|
+
.object({
|
|
2410
|
+
fullName: z.string().optional(),
|
|
2411
|
+
source: z.lazy(() => marshalDataSourceSchema).optional(),
|
|
2412
|
+
inputs: z.array(z.string()).optional(),
|
|
2413
|
+
function: z.lazy(() => marshalFunctionSchema).optional(),
|
|
2414
|
+
timeWindow: z.lazy(() => marshalTimeWindowSchema).optional(),
|
|
2415
|
+
description: z.string().optional(),
|
|
2416
|
+
filterCondition: z.string().optional(),
|
|
2417
|
+
lineageContext: z.lazy(() => marshalLineageContextSchema).optional(),
|
|
2418
|
+
entities: z.array(z.lazy(() => marshalEntityColumnSchema)).optional(),
|
|
2419
|
+
timeseriesColumn: z.lazy(() => marshalTimeseriesColumnSchema).optional(),
|
|
2420
|
+
catalogName: z.string().optional(),
|
|
2421
|
+
schemaName: z.string().optional(),
|
|
2422
|
+
name: z.string().optional(),
|
|
2423
|
+
createdAt: z
|
|
2424
|
+
.any()
|
|
2425
|
+
.transform((d: Temporal.Instant) => d.toString())
|
|
2426
|
+
.optional(),
|
|
2427
|
+
createdBy: z.string().optional(),
|
|
2428
|
+
})
|
|
2429
|
+
.transform(d => ({
|
|
2430
|
+
full_name: d.fullName,
|
|
2431
|
+
source: d.source,
|
|
2432
|
+
inputs: d.inputs,
|
|
2433
|
+
function: d.function,
|
|
2434
|
+
time_window: d.timeWindow,
|
|
2435
|
+
description: d.description,
|
|
2436
|
+
filter_condition: d.filterCondition,
|
|
2437
|
+
lineage_context: d.lineageContext,
|
|
2438
|
+
entities: d.entities,
|
|
2439
|
+
timeseries_column: d.timeseriesColumn,
|
|
2440
|
+
catalog_name: d.catalogName,
|
|
2441
|
+
schema_name: d.schemaName,
|
|
2442
|
+
name: d.name,
|
|
2443
|
+
created_at: d.createdAt,
|
|
2444
|
+
created_by: d.createdBy,
|
|
2445
|
+
}));
|
|
2446
|
+
|
|
2447
|
+
export const marshalFieldDefinitionSchema: z.ZodType = z
|
|
2448
|
+
.object({
|
|
2449
|
+
name: z.string().optional(),
|
|
2450
|
+
dataType: z.enum(ScalarDataType).optional(),
|
|
2451
|
+
})
|
|
2452
|
+
.transform(d => ({
|
|
2453
|
+
name: d.name,
|
|
2454
|
+
data_type: d.dataType,
|
|
2455
|
+
}));
|
|
2456
|
+
|
|
2457
|
+
export const marshalFirstFunctionSchema: z.ZodType = z
|
|
2458
|
+
.object({
|
|
2459
|
+
input: z.string().optional(),
|
|
2460
|
+
})
|
|
2461
|
+
.transform(d => ({
|
|
2462
|
+
input: d.input,
|
|
2463
|
+
}));
|
|
2464
|
+
|
|
2465
|
+
export const marshalFlatSchemaSchema: z.ZodType = z
|
|
2466
|
+
.object({
|
|
2467
|
+
fields: z.array(z.lazy(() => marshalFieldDefinitionSchema)).optional(),
|
|
2468
|
+
})
|
|
2469
|
+
.transform(d => ({
|
|
2470
|
+
fields: d.fields,
|
|
2471
|
+
}));
|
|
2472
|
+
|
|
2473
|
+
export const marshalFunctionSchema: z.ZodType = z
|
|
2474
|
+
.object({
|
|
2475
|
+
functionType: z.enum(Function_FunctionType).optional(),
|
|
2476
|
+
extraParameters: z
|
|
2477
|
+
.array(z.lazy(() => marshalFunction_ExtraParameterSchema))
|
|
2478
|
+
.optional(),
|
|
2479
|
+
function: z
|
|
2480
|
+
.discriminatedUnion('$case', [
|
|
2481
|
+
z.object({
|
|
2482
|
+
$case: z.literal('aggregationFunction'),
|
|
2483
|
+
aggregationFunction: z.lazy(() => marshalAggregationFunctionSchema),
|
|
2484
|
+
}),
|
|
2485
|
+
z.object({
|
|
2486
|
+
$case: z.literal('columnSelection'),
|
|
2487
|
+
columnSelection: z.lazy(() => marshalColumnSelectionSchema),
|
|
2488
|
+
}),
|
|
2489
|
+
])
|
|
2490
|
+
.optional(),
|
|
2491
|
+
})
|
|
2492
|
+
.transform(d => ({
|
|
2493
|
+
function_type: d.functionType,
|
|
2494
|
+
extra_parameters: d.extraParameters,
|
|
2495
|
+
...(d.function?.$case === 'aggregationFunction' && {
|
|
2496
|
+
aggregation_function: d.function.aggregationFunction,
|
|
2497
|
+
}),
|
|
2498
|
+
...(d.function?.$case === 'columnSelection' && {
|
|
2499
|
+
column_selection: d.function.columnSelection,
|
|
2500
|
+
}),
|
|
2501
|
+
}));
|
|
2502
|
+
|
|
2503
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
2504
|
+
export const marshalFunction_ExtraParameterSchema: z.ZodType = z
|
|
2505
|
+
.object({
|
|
2506
|
+
key: z.string().optional(),
|
|
2507
|
+
value: z.string().optional(),
|
|
2508
|
+
})
|
|
2509
|
+
.transform(d => ({
|
|
2510
|
+
key: d.key,
|
|
2511
|
+
value: d.value,
|
|
2512
|
+
}));
|
|
2513
|
+
|
|
2514
|
+
export const marshalIngestionConfigSchema: z.ZodType = z
|
|
2515
|
+
.object({
|
|
2516
|
+
ingestionDestination: z
|
|
2517
|
+
.lazy(() => marshalIngestionDestinationSchema)
|
|
2518
|
+
.optional(),
|
|
2519
|
+
backfillSource: z.lazy(() => marshalBackfillSourceSchema).optional(),
|
|
2520
|
+
deduplicationColumns: z.array(z.string()).optional(),
|
|
2521
|
+
ingestionPipelineId: z.string().optional(),
|
|
2522
|
+
ingestionJobId: z.bigint().optional(),
|
|
2523
|
+
backfillJobId: z.bigint().optional(),
|
|
2524
|
+
})
|
|
2525
|
+
.transform(d => ({
|
|
2526
|
+
ingestion_destination: d.ingestionDestination,
|
|
2527
|
+
backfill_source: d.backfillSource,
|
|
2528
|
+
deduplication_columns: d.deduplicationColumns,
|
|
2529
|
+
ingestion_pipeline_id: d.ingestionPipelineId,
|
|
2530
|
+
ingestion_job_id: d.ingestionJobId,
|
|
2531
|
+
backfill_job_id: d.backfillJobId,
|
|
2532
|
+
}));
|
|
2533
|
+
|
|
2534
|
+
export const marshalIngestionDestinationSchema: z.ZodType = z
|
|
2535
|
+
.object({
|
|
2536
|
+
ingestionDestination: z
|
|
2537
|
+
.discriminatedUnion('$case', [
|
|
2538
|
+
z.object({
|
|
2539
|
+
$case: z.literal('deltaTableName'),
|
|
2540
|
+
deltaTableName: z.string(),
|
|
2541
|
+
}),
|
|
2542
|
+
])
|
|
2543
|
+
.optional(),
|
|
2544
|
+
})
|
|
2545
|
+
.transform(d => ({
|
|
2546
|
+
...(d.ingestionDestination?.$case === 'deltaTableName' && {
|
|
2547
|
+
delta_table_name: d.ingestionDestination.deltaTableName,
|
|
2548
|
+
}),
|
|
2549
|
+
}));
|
|
2550
|
+
|
|
2551
|
+
export const marshalJobContextSchema: z.ZodType = z
|
|
2552
|
+
.object({
|
|
2553
|
+
jobId: z.bigint().optional(),
|
|
2554
|
+
jobRunId: z.bigint().optional(),
|
|
2555
|
+
})
|
|
2556
|
+
.transform(d => ({
|
|
2557
|
+
job_id: d.jobId,
|
|
2558
|
+
job_run_id: d.jobRunId,
|
|
2559
|
+
}));
|
|
2560
|
+
|
|
2561
|
+
export const marshalKafkaConfigSchema: z.ZodType = z
|
|
2562
|
+
.object({
|
|
2563
|
+
name: z.string().optional(),
|
|
2564
|
+
bootstrapServers: z.string().optional(),
|
|
2565
|
+
subscriptionMode: z.lazy(() => marshalSubscriptionModeSchema).optional(),
|
|
2566
|
+
authConfig: z.lazy(() => marshalAuthConfigSchema).optional(),
|
|
2567
|
+
keySchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
|
|
2568
|
+
valueSchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
|
|
2569
|
+
extraOptions: z.record(z.string(), z.string()).optional(),
|
|
2570
|
+
backfillSource: z.lazy(() => marshalBackfillSourceSchema).optional(),
|
|
2571
|
+
})
|
|
2572
|
+
.transform(d => ({
|
|
2573
|
+
name: d.name,
|
|
2574
|
+
bootstrap_servers: d.bootstrapServers,
|
|
2575
|
+
subscription_mode: d.subscriptionMode,
|
|
2576
|
+
auth_config: d.authConfig,
|
|
2577
|
+
key_schema: d.keySchema,
|
|
2578
|
+
value_schema: d.valueSchema,
|
|
2579
|
+
extra_options: d.extraOptions,
|
|
2580
|
+
backfill_source: d.backfillSource,
|
|
2581
|
+
}));
|
|
2582
|
+
|
|
2583
|
+
export const marshalKafkaSourceSchema: z.ZodType = z
|
|
2584
|
+
.object({
|
|
2585
|
+
name: z.string().optional(),
|
|
2586
|
+
entityColumnIdentifiers: z
|
|
2587
|
+
.array(z.lazy(() => marshalColumnIdentifierSchema))
|
|
2588
|
+
.optional(),
|
|
2589
|
+
timeseriesColumnIdentifier: z
|
|
2590
|
+
.lazy(() => marshalColumnIdentifierSchema)
|
|
2591
|
+
.optional(),
|
|
2592
|
+
filterCondition: z.string().optional(),
|
|
2593
|
+
})
|
|
2594
|
+
.transform(d => ({
|
|
2595
|
+
name: d.name,
|
|
2596
|
+
entity_column_identifiers: d.entityColumnIdentifiers,
|
|
2597
|
+
timeseries_column_identifier: d.timeseriesColumnIdentifier,
|
|
2598
|
+
filter_condition: d.filterCondition,
|
|
2599
|
+
}));
|
|
2600
|
+
|
|
2601
|
+
export const marshalKafkaStreamConfigSchema: z.ZodType = z
|
|
2602
|
+
.object({
|
|
2603
|
+
subscriptionMode: z
|
|
2604
|
+
.lazy(() => marshalKafkaSubscriptionModeSchema)
|
|
2605
|
+
.optional(),
|
|
2606
|
+
extraOptions: z.record(z.string(), z.string()).optional(),
|
|
2607
|
+
})
|
|
2608
|
+
.transform(d => ({
|
|
2609
|
+
subscription_mode: d.subscriptionMode,
|
|
2610
|
+
extra_options: d.extraOptions,
|
|
2611
|
+
}));
|
|
2612
|
+
|
|
2613
|
+
export const marshalKafkaSubscriptionModeSchema: z.ZodType = z
|
|
2614
|
+
.object({
|
|
2615
|
+
subscriptionMode: z
|
|
2616
|
+
.discriminatedUnion('$case', [
|
|
2617
|
+
z.object({$case: z.literal('assign'), assign: z.string()}),
|
|
2618
|
+
z.object({$case: z.literal('subscribe'), subscribe: z.string()}),
|
|
2619
|
+
z.object({
|
|
2620
|
+
$case: z.literal('subscribePattern'),
|
|
2621
|
+
subscribePattern: z.string(),
|
|
2622
|
+
}),
|
|
2623
|
+
])
|
|
2624
|
+
.optional(),
|
|
2625
|
+
})
|
|
2626
|
+
.transform(d => ({
|
|
2627
|
+
...(d.subscriptionMode?.$case === 'assign' && {
|
|
2628
|
+
assign: d.subscriptionMode.assign,
|
|
2629
|
+
}),
|
|
2630
|
+
...(d.subscriptionMode?.$case === 'subscribe' && {
|
|
2631
|
+
subscribe: d.subscriptionMode.subscribe,
|
|
2632
|
+
}),
|
|
2633
|
+
...(d.subscriptionMode?.$case === 'subscribePattern' && {
|
|
2634
|
+
subscribe_pattern: d.subscriptionMode.subscribePattern,
|
|
2635
|
+
}),
|
|
2636
|
+
}));
|
|
2637
|
+
|
|
2638
|
+
export const marshalLastFunctionSchema: z.ZodType = z
|
|
2639
|
+
.object({
|
|
2640
|
+
input: z.string().optional(),
|
|
2641
|
+
})
|
|
2642
|
+
.transform(d => ({
|
|
2643
|
+
input: d.input,
|
|
2644
|
+
}));
|
|
2645
|
+
|
|
2646
|
+
export const marshalLineageContextSchema: z.ZodType = z
|
|
2647
|
+
.object({
|
|
2648
|
+
notebookId: z.bigint().optional(),
|
|
2649
|
+
jobContext: z.lazy(() => marshalJobContextSchema).optional(),
|
|
2650
|
+
})
|
|
2651
|
+
.transform(d => ({
|
|
2652
|
+
notebook_id: d.notebookId,
|
|
2653
|
+
job_context: d.jobContext,
|
|
2654
|
+
}));
|
|
2655
|
+
|
|
2656
|
+
export const marshalMaterializedFeatureSchema: z.ZodType = z
|
|
2657
|
+
.object({
|
|
2658
|
+
materializedFeatureId: z.string().optional(),
|
|
2659
|
+
featureName: z.string().optional(),
|
|
2660
|
+
destination: z
|
|
2661
|
+
.discriminatedUnion('$case', [
|
|
2662
|
+
z.object({
|
|
2663
|
+
$case: z.literal('offlineStoreConfig'),
|
|
2664
|
+
offlineStoreConfig: z.lazy(() => marshalOfflineStoreConfigSchema),
|
|
2665
|
+
}),
|
|
2666
|
+
z.object({
|
|
2667
|
+
$case: z.literal('onlineStoreConfig'),
|
|
2668
|
+
onlineStoreConfig: z.lazy(() => marshalOnlineStoreConfigSchema),
|
|
2669
|
+
}),
|
|
2670
|
+
])
|
|
2671
|
+
.optional(),
|
|
2672
|
+
tableName: z.string().optional(),
|
|
2673
|
+
pipelineScheduleState: z
|
|
2674
|
+
.enum(MaterializedFeature_PipelineScheduleState)
|
|
2675
|
+
.optional(),
|
|
2676
|
+
lastMaterializationTime: z
|
|
2677
|
+
.any()
|
|
2678
|
+
.transform((d: Temporal.Instant) => d.toString())
|
|
2679
|
+
.optional(),
|
|
2680
|
+
cronSchedule: z.string().optional(),
|
|
2681
|
+
isOnline: z.boolean().optional(),
|
|
2682
|
+
trigger: z
|
|
2683
|
+
.discriminatedUnion('$case', [
|
|
2684
|
+
z.object({
|
|
2685
|
+
$case: z.literal('cronScheduleTrigger'),
|
|
2686
|
+
cronScheduleTrigger: z.lazy(() => marshalCronScheduleSchema),
|
|
2687
|
+
}),
|
|
2688
|
+
z.object({
|
|
2689
|
+
$case: z.literal('tableTrigger'),
|
|
2690
|
+
tableTrigger: z.lazy(() => marshalTableTriggerSchema),
|
|
2691
|
+
}),
|
|
2692
|
+
z.object({
|
|
2693
|
+
$case: z.literal('streamingMode'),
|
|
2694
|
+
streamingMode: z.lazy(() => marshalStreamingModeSchema),
|
|
2695
|
+
}),
|
|
2696
|
+
])
|
|
2697
|
+
.optional(),
|
|
2698
|
+
})
|
|
2699
|
+
.transform(d => ({
|
|
2700
|
+
materialized_feature_id: d.materializedFeatureId,
|
|
2701
|
+
feature_name: d.featureName,
|
|
2702
|
+
...(d.destination?.$case === 'offlineStoreConfig' && {
|
|
2703
|
+
offline_store_config: d.destination.offlineStoreConfig,
|
|
2704
|
+
}),
|
|
2705
|
+
...(d.destination?.$case === 'onlineStoreConfig' && {
|
|
2706
|
+
online_store_config: d.destination.onlineStoreConfig,
|
|
2707
|
+
}),
|
|
2708
|
+
table_name: d.tableName,
|
|
2709
|
+
pipeline_schedule_state: d.pipelineScheduleState,
|
|
2710
|
+
last_materialization_time: d.lastMaterializationTime,
|
|
2711
|
+
cron_schedule: d.cronSchedule,
|
|
2712
|
+
is_online: d.isOnline,
|
|
2713
|
+
...(d.trigger?.$case === 'cronScheduleTrigger' && {
|
|
2714
|
+
cron_schedule_trigger: d.trigger.cronScheduleTrigger,
|
|
2715
|
+
}),
|
|
2716
|
+
...(d.trigger?.$case === 'tableTrigger' && {
|
|
2717
|
+
table_trigger: d.trigger.tableTrigger,
|
|
2718
|
+
}),
|
|
2719
|
+
...(d.trigger?.$case === 'streamingMode' && {
|
|
2720
|
+
streaming_mode: d.trigger.streamingMode,
|
|
2721
|
+
}),
|
|
2722
|
+
}));
|
|
2723
|
+
|
|
2724
|
+
export const marshalMaxFunctionSchema: z.ZodType = z
|
|
2725
|
+
.object({
|
|
2726
|
+
input: z.string().optional(),
|
|
2727
|
+
})
|
|
2728
|
+
.transform(d => ({
|
|
2729
|
+
input: d.input,
|
|
2730
|
+
}));
|
|
2731
|
+
|
|
2732
|
+
export const marshalMinFunctionSchema: z.ZodType = z
|
|
2733
|
+
.object({
|
|
2734
|
+
input: z.string().optional(),
|
|
2735
|
+
})
|
|
2736
|
+
.transform(d => ({
|
|
2737
|
+
input: d.input,
|
|
2738
|
+
}));
|
|
2739
|
+
|
|
2740
|
+
export const marshalMtlsConfigSchema: z.ZodType = z
|
|
2741
|
+
.object({
|
|
2742
|
+
keystoreLocation: z.string().optional(),
|
|
2743
|
+
keystorePasswordRef: z
|
|
2744
|
+
.lazy(() => marshalSecretScopeReferenceSchema)
|
|
2745
|
+
.optional(),
|
|
2746
|
+
keyPasswordRef: z.lazy(() => marshalSecretScopeReferenceSchema).optional(),
|
|
2747
|
+
truststoreLocation: z.string().optional(),
|
|
2748
|
+
truststorePasswordRef: z
|
|
2749
|
+
.lazy(() => marshalSecretScopeReferenceSchema)
|
|
2750
|
+
.optional(),
|
|
2751
|
+
disableHostnameVerification: z.boolean().optional(),
|
|
2752
|
+
})
|
|
2753
|
+
.transform(d => ({
|
|
2754
|
+
keystore_location: d.keystoreLocation,
|
|
2755
|
+
keystore_password_ref: d.keystorePasswordRef,
|
|
2756
|
+
key_password_ref: d.keyPasswordRef,
|
|
2757
|
+
truststore_location: d.truststoreLocation,
|
|
2758
|
+
truststore_password_ref: d.truststorePasswordRef,
|
|
2759
|
+
disable_hostname_verification: d.disableHostnameVerification,
|
|
2760
|
+
}));
|
|
2761
|
+
|
|
2762
|
+
export const marshalOfflineStoreConfigSchema: z.ZodType = z
|
|
2763
|
+
.object({
|
|
2764
|
+
catalogName: z.string().optional(),
|
|
2765
|
+
schemaName: z.string().optional(),
|
|
2766
|
+
tableNamePrefix: z.string().optional(),
|
|
2767
|
+
})
|
|
2768
|
+
.transform(d => ({
|
|
2769
|
+
catalog_name: d.catalogName,
|
|
2770
|
+
schema_name: d.schemaName,
|
|
2771
|
+
table_name_prefix: d.tableNamePrefix,
|
|
2772
|
+
}));
|
|
2773
|
+
|
|
2774
|
+
export const marshalOnlineStoreConfigSchema: z.ZodType = z
|
|
2775
|
+
.object({
|
|
2776
|
+
catalogName: z.string().optional(),
|
|
2777
|
+
schemaName: z.string().optional(),
|
|
2778
|
+
tableNamePrefix: z.string().optional(),
|
|
2779
|
+
onlineStoreName: z.string().optional(),
|
|
2780
|
+
})
|
|
2781
|
+
.transform(d => ({
|
|
2782
|
+
catalog_name: d.catalogName,
|
|
2783
|
+
schema_name: d.schemaName,
|
|
2784
|
+
table_name_prefix: d.tableNamePrefix,
|
|
2785
|
+
online_store_name: d.onlineStoreName,
|
|
2786
|
+
}));
|
|
2787
|
+
|
|
2788
|
+
export const marshalRequestSourceSchema: z.ZodType = z
|
|
2789
|
+
.object({
|
|
2790
|
+
schema: z
|
|
2791
|
+
.discriminatedUnion('$case', [
|
|
2792
|
+
z.object({
|
|
2793
|
+
$case: z.literal('flatSchema'),
|
|
2794
|
+
flatSchema: z.lazy(() => marshalFlatSchemaSchema),
|
|
2795
|
+
}),
|
|
2796
|
+
])
|
|
2797
|
+
.optional(),
|
|
2798
|
+
})
|
|
2799
|
+
.transform(d => ({
|
|
2800
|
+
...(d.schema?.$case === 'flatSchema' && {flat_schema: d.schema.flatSchema}),
|
|
2801
|
+
}));
|
|
2802
|
+
|
|
2803
|
+
export const marshalRollingWindowSchema: z.ZodType = z
|
|
2804
|
+
.object({
|
|
2805
|
+
windowDuration: z
|
|
2806
|
+
.any()
|
|
2807
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2808
|
+
.optional(),
|
|
2809
|
+
delay: z
|
|
2810
|
+
.any()
|
|
2811
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2812
|
+
.optional(),
|
|
2813
|
+
})
|
|
2814
|
+
.transform(d => ({
|
|
2815
|
+
window_duration: d.windowDuration,
|
|
2816
|
+
delay: d.delay,
|
|
2817
|
+
}));
|
|
2818
|
+
|
|
2819
|
+
export const marshalSchemaConfigSchema: z.ZodType = z
|
|
2820
|
+
.object({
|
|
2821
|
+
schema: z
|
|
2822
|
+
.discriminatedUnion('$case', [
|
|
2823
|
+
z.object({$case: z.literal('jsonSchema'), jsonSchema: z.string()}),
|
|
2824
|
+
])
|
|
2825
|
+
.optional(),
|
|
2826
|
+
})
|
|
2827
|
+
.transform(d => ({
|
|
2828
|
+
...(d.schema?.$case === 'jsonSchema' && {json_schema: d.schema.jsonSchema}),
|
|
2829
|
+
}));
|
|
2830
|
+
|
|
2831
|
+
export const marshalSecretScopeReferenceSchema: z.ZodType = z
|
|
2832
|
+
.object({
|
|
2833
|
+
scope: z.string().optional(),
|
|
2834
|
+
key: z.string().optional(),
|
|
2835
|
+
})
|
|
2836
|
+
.transform(d => ({
|
|
2837
|
+
scope: d.scope,
|
|
2838
|
+
key: d.key,
|
|
2839
|
+
}));
|
|
2840
|
+
|
|
2841
|
+
export const marshalSlidingWindowSchema: z.ZodType = z
|
|
2842
|
+
.object({
|
|
2843
|
+
windowDuration: z
|
|
2844
|
+
.any()
|
|
2845
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2846
|
+
.optional(),
|
|
2847
|
+
slideDuration: z
|
|
2848
|
+
.any()
|
|
2849
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
2850
|
+
.optional(),
|
|
2851
|
+
})
|
|
2852
|
+
.transform(d => ({
|
|
2853
|
+
window_duration: d.windowDuration,
|
|
2854
|
+
slide_duration: d.slideDuration,
|
|
2855
|
+
}));
|
|
2856
|
+
|
|
2857
|
+
export const marshalStddevPopFunctionSchema: z.ZodType = z
|
|
2858
|
+
.object({
|
|
2859
|
+
input: z.string().optional(),
|
|
2860
|
+
})
|
|
2861
|
+
.transform(d => ({
|
|
2862
|
+
input: d.input,
|
|
2863
|
+
}));
|
|
2864
|
+
|
|
2865
|
+
export const marshalStddevSampFunctionSchema: z.ZodType = z
|
|
2866
|
+
.object({
|
|
2867
|
+
input: z.string().optional(),
|
|
2868
|
+
})
|
|
2869
|
+
.transform(d => ({
|
|
2870
|
+
input: d.input,
|
|
2871
|
+
}));
|
|
2872
|
+
|
|
2873
|
+
export const marshalStreamSchema: z.ZodType = z
|
|
2874
|
+
.object({
|
|
2875
|
+
name: z.string().optional(),
|
|
2876
|
+
description: z.string().optional(),
|
|
2877
|
+
sourceConfig: z.lazy(() => marshalStreamSourceConfigSchema).optional(),
|
|
2878
|
+
connectionConfig: z
|
|
2879
|
+
.lazy(() => marshalStreamConnectionConfigSchema)
|
|
2880
|
+
.optional(),
|
|
2881
|
+
schemaConfig: z.lazy(() => marshalStreamSchemaConfigSchema).optional(),
|
|
2882
|
+
ingestionConfig: z.lazy(() => marshalIngestionConfigSchema).optional(),
|
|
2883
|
+
createTime: z
|
|
2884
|
+
.any()
|
|
2885
|
+
.transform((d: Temporal.Instant) => d.toString())
|
|
2886
|
+
.optional(),
|
|
2887
|
+
createdBy: z.string().optional(),
|
|
2888
|
+
updateTime: z
|
|
2889
|
+
.any()
|
|
2890
|
+
.transform((d: Temporal.Instant) => d.toString())
|
|
2891
|
+
.optional(),
|
|
2892
|
+
updatedBy: z.string().optional(),
|
|
2893
|
+
browseOnly: z.boolean().optional(),
|
|
2894
|
+
})
|
|
2895
|
+
.transform(d => ({
|
|
2896
|
+
name: d.name,
|
|
2897
|
+
description: d.description,
|
|
2898
|
+
source_config: d.sourceConfig,
|
|
2899
|
+
connection_config: d.connectionConfig,
|
|
2900
|
+
schema_config: d.schemaConfig,
|
|
2901
|
+
ingestion_config: d.ingestionConfig,
|
|
2902
|
+
create_time: d.createTime,
|
|
2903
|
+
created_by: d.createdBy,
|
|
2904
|
+
update_time: d.updateTime,
|
|
2905
|
+
updated_by: d.updatedBy,
|
|
2906
|
+
browse_only: d.browseOnly,
|
|
2907
|
+
}));
|
|
2908
|
+
|
|
2909
|
+
export const marshalStreamConnectionConfigSchema: z.ZodType = z
|
|
2910
|
+
.object({
|
|
2911
|
+
connectionConfig: z
|
|
2912
|
+
.discriminatedUnion('$case', [
|
|
2913
|
+
z.object({
|
|
2914
|
+
$case: z.literal('ucConnectionName'),
|
|
2915
|
+
ucConnectionName: z.string(),
|
|
2916
|
+
}),
|
|
2917
|
+
z.object({
|
|
2918
|
+
$case: z.literal('directMtlsConfig'),
|
|
2919
|
+
directMtlsConfig: z.lazy(() => marshalDirectMtlsConfigSchema),
|
|
2920
|
+
}),
|
|
2921
|
+
])
|
|
2922
|
+
.optional(),
|
|
2923
|
+
})
|
|
2924
|
+
.transform(d => ({
|
|
2925
|
+
...(d.connectionConfig?.$case === 'ucConnectionName' && {
|
|
2926
|
+
uc_connection_name: d.connectionConfig.ucConnectionName,
|
|
2927
|
+
}),
|
|
2928
|
+
...(d.connectionConfig?.$case === 'directMtlsConfig' && {
|
|
2929
|
+
direct_mtls_config: d.connectionConfig.directMtlsConfig,
|
|
2930
|
+
}),
|
|
2931
|
+
}));
|
|
2932
|
+
|
|
2933
|
+
export const marshalStreamSchemaConfigSchema: z.ZodType = z
|
|
2934
|
+
.object({
|
|
2935
|
+
schemaConfig: z
|
|
2936
|
+
.discriminatedUnion('$case', [
|
|
2937
|
+
z.object({
|
|
2938
|
+
$case: z.literal('directSchemas'),
|
|
2939
|
+
directSchemas: z.lazy(() => marshalDirectSchemasSchema),
|
|
2940
|
+
}),
|
|
2941
|
+
])
|
|
2942
|
+
.optional(),
|
|
2943
|
+
})
|
|
2944
|
+
.transform(d => ({
|
|
2945
|
+
...(d.schemaConfig?.$case === 'directSchemas' && {
|
|
2946
|
+
direct_schemas: d.schemaConfig.directSchemas,
|
|
2947
|
+
}),
|
|
2948
|
+
}));
|
|
2949
|
+
|
|
2950
|
+
export const marshalStreamSourceConfigSchema: z.ZodType = z
|
|
2951
|
+
.object({
|
|
2952
|
+
sourceConfig: z
|
|
2953
|
+
.discriminatedUnion('$case', [
|
|
2954
|
+
z.object({
|
|
2955
|
+
$case: z.literal('kafkaStreamConfig'),
|
|
2956
|
+
kafkaStreamConfig: z.lazy(() => marshalKafkaStreamConfigSchema),
|
|
2957
|
+
}),
|
|
2958
|
+
])
|
|
2959
|
+
.optional(),
|
|
2960
|
+
})
|
|
2961
|
+
.transform(d => ({
|
|
2962
|
+
...(d.sourceConfig?.$case === 'kafkaStreamConfig' && {
|
|
2963
|
+
kafka_stream_config: d.sourceConfig.kafkaStreamConfig,
|
|
2964
|
+
}),
|
|
2965
|
+
}));
|
|
2966
|
+
|
|
2967
|
+
export const marshalStreamingModeSchema: z.ZodType = z
|
|
2968
|
+
.object({
|
|
2969
|
+
mode: z.enum(StreamingMode_StreamingModeType).optional(),
|
|
2970
|
+
})
|
|
2971
|
+
.transform(d => ({
|
|
2972
|
+
mode: d.mode,
|
|
2973
|
+
}));
|
|
2974
|
+
|
|
2975
|
+
export const marshalSubscriptionModeSchema: z.ZodType = z
|
|
2976
|
+
.object({
|
|
2977
|
+
subscriptionMode: z
|
|
2978
|
+
.discriminatedUnion('$case', [
|
|
2979
|
+
z.object({$case: z.literal('assign'), assign: z.string()}),
|
|
2980
|
+
z.object({$case: z.literal('subscribe'), subscribe: z.string()}),
|
|
2981
|
+
z.object({
|
|
2982
|
+
$case: z.literal('subscribePattern'),
|
|
2983
|
+
subscribePattern: z.string(),
|
|
2984
|
+
}),
|
|
2985
|
+
])
|
|
2986
|
+
.optional(),
|
|
2987
|
+
})
|
|
2988
|
+
.transform(d => ({
|
|
2989
|
+
...(d.subscriptionMode?.$case === 'assign' && {
|
|
2990
|
+
assign: d.subscriptionMode.assign,
|
|
2991
|
+
}),
|
|
2992
|
+
...(d.subscriptionMode?.$case === 'subscribe' && {
|
|
2993
|
+
subscribe: d.subscriptionMode.subscribe,
|
|
2994
|
+
}),
|
|
2995
|
+
...(d.subscriptionMode?.$case === 'subscribePattern' && {
|
|
2996
|
+
subscribe_pattern: d.subscriptionMode.subscribePattern,
|
|
2997
|
+
}),
|
|
2998
|
+
}));
|
|
2999
|
+
|
|
3000
|
+
export const marshalSumFunctionSchema: z.ZodType = z
|
|
3001
|
+
.object({
|
|
3002
|
+
input: z.string().optional(),
|
|
3003
|
+
})
|
|
3004
|
+
.transform(d => ({
|
|
3005
|
+
input: d.input,
|
|
3006
|
+
}));
|
|
3007
|
+
|
|
3008
|
+
export const marshalTableTriggerSchema: z.ZodType = z.object({});
|
|
3009
|
+
|
|
3010
|
+
export const marshalTimeWindowSchema: z.ZodType = z
|
|
3011
|
+
.object({
|
|
3012
|
+
windowType: z
|
|
3013
|
+
.discriminatedUnion('$case', [
|
|
3014
|
+
z.object({
|
|
3015
|
+
$case: z.literal('continuous'),
|
|
3016
|
+
continuous: z.lazy(() => marshalContinuousWindowSchema),
|
|
3017
|
+
}),
|
|
3018
|
+
z.object({
|
|
3019
|
+
$case: z.literal('tumbling'),
|
|
3020
|
+
tumbling: z.lazy(() => marshalTumblingWindowSchema),
|
|
3021
|
+
}),
|
|
3022
|
+
z.object({
|
|
3023
|
+
$case: z.literal('sliding'),
|
|
3024
|
+
sliding: z.lazy(() => marshalSlidingWindowSchema),
|
|
3025
|
+
}),
|
|
3026
|
+
z.object({
|
|
3027
|
+
$case: z.literal('rolling'),
|
|
3028
|
+
rolling: z.lazy(() => marshalRollingWindowSchema),
|
|
3029
|
+
}),
|
|
3030
|
+
])
|
|
3031
|
+
.optional(),
|
|
3032
|
+
})
|
|
3033
|
+
.transform(d => ({
|
|
3034
|
+
...(d.windowType?.$case === 'continuous' && {
|
|
3035
|
+
continuous: d.windowType.continuous,
|
|
3036
|
+
}),
|
|
3037
|
+
...(d.windowType?.$case === 'tumbling' && {
|
|
3038
|
+
tumbling: d.windowType.tumbling,
|
|
3039
|
+
}),
|
|
3040
|
+
...(d.windowType?.$case === 'sliding' && {sliding: d.windowType.sliding}),
|
|
3041
|
+
...(d.windowType?.$case === 'rolling' && {rolling: d.windowType.rolling}),
|
|
3042
|
+
}));
|
|
3043
|
+
|
|
3044
|
+
export const marshalTimeseriesColumnSchema: z.ZodType = z
|
|
3045
|
+
.object({
|
|
3046
|
+
name: z.string().optional(),
|
|
3047
|
+
})
|
|
3048
|
+
.transform(d => ({
|
|
3049
|
+
name: d.name,
|
|
3050
|
+
}));
|
|
3051
|
+
|
|
3052
|
+
export const marshalTumblingWindowSchema: z.ZodType = z
|
|
3053
|
+
.object({
|
|
3054
|
+
windowDuration: z
|
|
3055
|
+
.any()
|
|
3056
|
+
.transform((d: Temporal.Duration) => d.toString().slice(2).toLowerCase())
|
|
3057
|
+
.optional(),
|
|
3058
|
+
})
|
|
3059
|
+
.transform(d => ({
|
|
3060
|
+
window_duration: d.windowDuration,
|
|
3061
|
+
}));
|
|
3062
|
+
|
|
3063
|
+
export const marshalVarPopFunctionSchema: z.ZodType = z
|
|
3064
|
+
.object({
|
|
3065
|
+
input: z.string().optional(),
|
|
3066
|
+
})
|
|
3067
|
+
.transform(d => ({
|
|
3068
|
+
input: d.input,
|
|
3069
|
+
}));
|
|
3070
|
+
|
|
3071
|
+
export const marshalVarSampFunctionSchema: z.ZodType = z
|
|
3072
|
+
.object({
|
|
3073
|
+
input: z.string().optional(),
|
|
3074
|
+
})
|
|
3075
|
+
.transform(d => ({
|
|
3076
|
+
input: d.input,
|
|
3077
|
+
}));
|
|
3078
|
+
|
|
3079
|
+
const aggregationFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3080
|
+
approxCountDistinct: {
|
|
3081
|
+
wire: 'approx_count_distinct',
|
|
3082
|
+
children: () => approxCountDistinctFunctionFieldMaskSchema,
|
|
3083
|
+
},
|
|
3084
|
+
approxPercentile: {
|
|
3085
|
+
wire: 'approx_percentile',
|
|
3086
|
+
children: () => approxPercentileFunctionFieldMaskSchema,
|
|
3087
|
+
},
|
|
3088
|
+
avg: {wire: 'avg', children: () => avgFunctionFieldMaskSchema},
|
|
3089
|
+
countFunction: {
|
|
3090
|
+
wire: 'count_function',
|
|
3091
|
+
children: () => countFunctionFieldMaskSchema,
|
|
3092
|
+
},
|
|
3093
|
+
first: {wire: 'first', children: () => firstFunctionFieldMaskSchema},
|
|
3094
|
+
last: {wire: 'last', children: () => lastFunctionFieldMaskSchema},
|
|
3095
|
+
max: {wire: 'max', children: () => maxFunctionFieldMaskSchema},
|
|
3096
|
+
min: {wire: 'min', children: () => minFunctionFieldMaskSchema},
|
|
3097
|
+
stddevPop: {
|
|
3098
|
+
wire: 'stddev_pop',
|
|
3099
|
+
children: () => stddevPopFunctionFieldMaskSchema,
|
|
3100
|
+
},
|
|
3101
|
+
stddevSamp: {
|
|
3102
|
+
wire: 'stddev_samp',
|
|
3103
|
+
children: () => stddevSampFunctionFieldMaskSchema,
|
|
3104
|
+
},
|
|
3105
|
+
sum: {wire: 'sum', children: () => sumFunctionFieldMaskSchema},
|
|
3106
|
+
timeWindow: {wire: 'time_window', children: () => timeWindowFieldMaskSchema},
|
|
3107
|
+
varPop: {wire: 'var_pop', children: () => varPopFunctionFieldMaskSchema},
|
|
3108
|
+
varSamp: {wire: 'var_samp', children: () => varSampFunctionFieldMaskSchema},
|
|
3109
|
+
};
|
|
3110
|
+
|
|
3111
|
+
const approxCountDistinctFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3112
|
+
input: {wire: 'input'},
|
|
3113
|
+
relativeSd: {wire: 'relative_sd'},
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
const approxPercentileFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3117
|
+
accuracy: {wire: 'accuracy'},
|
|
3118
|
+
input: {wire: 'input'},
|
|
3119
|
+
percentile: {wire: 'percentile'},
|
|
3120
|
+
};
|
|
3121
|
+
|
|
3122
|
+
const authConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3123
|
+
mtlsConfig: {wire: 'mtls_config', children: () => mtlsConfigFieldMaskSchema},
|
|
3124
|
+
ucServiceCredentialName: {wire: 'uc_service_credential_name'},
|
|
3125
|
+
};
|
|
3126
|
+
|
|
3127
|
+
const avgFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3128
|
+
input: {wire: 'input'},
|
|
3129
|
+
};
|
|
3130
|
+
|
|
3131
|
+
const backfillSourceFieldMaskSchema: FieldMaskSchema = {
|
|
3132
|
+
deltaTableName: {wire: 'delta_table_name'},
|
|
3133
|
+
deltaTableSource: {
|
|
3134
|
+
wire: 'delta_table_source',
|
|
3135
|
+
children: () => deltaTableSourceFieldMaskSchema,
|
|
3136
|
+
},
|
|
3137
|
+
};
|
|
3138
|
+
|
|
3139
|
+
const columnIdentifierFieldMaskSchema: FieldMaskSchema = {
|
|
3140
|
+
variantExprPath: {wire: 'variant_expr_path'},
|
|
3141
|
+
};
|
|
3142
|
+
|
|
3143
|
+
const columnSelectionFieldMaskSchema: FieldMaskSchema = {
|
|
3144
|
+
column: {wire: 'column'},
|
|
3145
|
+
};
|
|
3146
|
+
|
|
3147
|
+
const continuousWindowFieldMaskSchema: FieldMaskSchema = {
|
|
3148
|
+
offset: {wire: 'offset'},
|
|
3149
|
+
windowDuration: {wire: 'window_duration'},
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3152
|
+
const countFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3153
|
+
input: {wire: 'input'},
|
|
3154
|
+
};
|
|
3155
|
+
|
|
3156
|
+
const cronScheduleFieldMaskSchema: FieldMaskSchema = {
|
|
3157
|
+
cronExpression: {wire: 'cron_expression'},
|
|
3158
|
+
};
|
|
3159
|
+
|
|
3160
|
+
const dataSourceFieldMaskSchema: FieldMaskSchema = {
|
|
3161
|
+
deltaTableSource: {
|
|
3162
|
+
wire: 'delta_table_source',
|
|
3163
|
+
children: () => deltaTableSourceFieldMaskSchema,
|
|
3164
|
+
},
|
|
3165
|
+
kafkaSource: {
|
|
3166
|
+
wire: 'kafka_source',
|
|
3167
|
+
children: () => kafkaSourceFieldMaskSchema,
|
|
3168
|
+
},
|
|
3169
|
+
requestSource: {
|
|
3170
|
+
wire: 'request_source',
|
|
3171
|
+
children: () => requestSourceFieldMaskSchema,
|
|
3172
|
+
},
|
|
3173
|
+
};
|
|
3174
|
+
|
|
3175
|
+
const deltaTableSourceFieldMaskSchema: FieldMaskSchema = {
|
|
3176
|
+
dataframeSchema: {wire: 'dataframe_schema'},
|
|
3177
|
+
entityColumns: {wire: 'entity_columns'},
|
|
3178
|
+
filterCondition: {wire: 'filter_condition'},
|
|
3179
|
+
fullName: {wire: 'full_name'},
|
|
3180
|
+
timeseriesColumn: {wire: 'timeseries_column'},
|
|
3181
|
+
transformationSql: {wire: 'transformation_sql'},
|
|
3182
|
+
};
|
|
3183
|
+
|
|
3184
|
+
const directMtlsConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3185
|
+
bootstrapServers: {wire: 'bootstrap_servers'},
|
|
3186
|
+
mtlsConfig: {wire: 'mtls_config', children: () => mtlsConfigFieldMaskSchema},
|
|
3187
|
+
};
|
|
3188
|
+
|
|
3189
|
+
const directSchemasFieldMaskSchema: FieldMaskSchema = {
|
|
3190
|
+
keySchema: {wire: 'key_schema', children: () => schemaConfigFieldMaskSchema},
|
|
3191
|
+
payloadSchema: {
|
|
3192
|
+
wire: 'payload_schema',
|
|
3193
|
+
children: () => schemaConfigFieldMaskSchema,
|
|
3194
|
+
},
|
|
3195
|
+
};
|
|
3196
|
+
|
|
3197
|
+
const featureFieldMaskSchema: FieldMaskSchema = {
|
|
3198
|
+
catalogName: {wire: 'catalog_name'},
|
|
3199
|
+
createdAt: {wire: 'created_at'},
|
|
3200
|
+
createdBy: {wire: 'created_by'},
|
|
3201
|
+
description: {wire: 'description'},
|
|
3202
|
+
entities: {wire: 'entities'},
|
|
3203
|
+
filterCondition: {wire: 'filter_condition'},
|
|
3204
|
+
fullName: {wire: 'full_name'},
|
|
3205
|
+
function: {wire: 'function', children: () => functionFieldMaskSchema},
|
|
3206
|
+
inputs: {wire: 'inputs'},
|
|
3207
|
+
lineageContext: {
|
|
3208
|
+
wire: 'lineage_context',
|
|
3209
|
+
children: () => lineageContextFieldMaskSchema,
|
|
3210
|
+
},
|
|
3211
|
+
name: {wire: 'name'},
|
|
3212
|
+
schemaName: {wire: 'schema_name'},
|
|
3213
|
+
source: {wire: 'source', children: () => dataSourceFieldMaskSchema},
|
|
3214
|
+
timeWindow: {wire: 'time_window', children: () => timeWindowFieldMaskSchema},
|
|
3215
|
+
timeseriesColumn: {
|
|
3216
|
+
wire: 'timeseries_column',
|
|
3217
|
+
children: () => timeseriesColumnFieldMaskSchema,
|
|
3218
|
+
},
|
|
3219
|
+
};
|
|
3220
|
+
|
|
3221
|
+
export function featureFieldMask(...paths: string[]): FieldMask<Feature> {
|
|
3222
|
+
return FieldMask.build<Feature>(paths, featureFieldMaskSchema);
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
const firstFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3226
|
+
input: {wire: 'input'},
|
|
3227
|
+
};
|
|
3228
|
+
|
|
3229
|
+
const flatSchemaFieldMaskSchema: FieldMaskSchema = {
|
|
3230
|
+
fields: {wire: 'fields'},
|
|
3231
|
+
};
|
|
3232
|
+
|
|
3233
|
+
const functionFieldMaskSchema: FieldMaskSchema = {
|
|
3234
|
+
aggregationFunction: {
|
|
3235
|
+
wire: 'aggregation_function',
|
|
3236
|
+
children: () => aggregationFunctionFieldMaskSchema,
|
|
3237
|
+
},
|
|
3238
|
+
columnSelection: {
|
|
3239
|
+
wire: 'column_selection',
|
|
3240
|
+
children: () => columnSelectionFieldMaskSchema,
|
|
3241
|
+
},
|
|
3242
|
+
extraParameters: {wire: 'extra_parameters'},
|
|
3243
|
+
functionType: {wire: 'function_type'},
|
|
3244
|
+
};
|
|
3245
|
+
|
|
3246
|
+
const ingestionConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3247
|
+
backfillJobId: {wire: 'backfill_job_id'},
|
|
3248
|
+
backfillSource: {
|
|
3249
|
+
wire: 'backfill_source',
|
|
3250
|
+
children: () => backfillSourceFieldMaskSchema,
|
|
3251
|
+
},
|
|
3252
|
+
deduplicationColumns: {wire: 'deduplication_columns'},
|
|
3253
|
+
ingestionDestination: {
|
|
3254
|
+
wire: 'ingestion_destination',
|
|
3255
|
+
children: () => ingestionDestinationFieldMaskSchema,
|
|
3256
|
+
},
|
|
3257
|
+
ingestionJobId: {wire: 'ingestion_job_id'},
|
|
3258
|
+
ingestionPipelineId: {wire: 'ingestion_pipeline_id'},
|
|
3259
|
+
};
|
|
3260
|
+
|
|
3261
|
+
const ingestionDestinationFieldMaskSchema: FieldMaskSchema = {
|
|
3262
|
+
deltaTableName: {wire: 'delta_table_name'},
|
|
3263
|
+
};
|
|
3264
|
+
|
|
3265
|
+
const jobContextFieldMaskSchema: FieldMaskSchema = {
|
|
3266
|
+
jobId: {wire: 'job_id'},
|
|
3267
|
+
jobRunId: {wire: 'job_run_id'},
|
|
3268
|
+
};
|
|
3269
|
+
|
|
3270
|
+
const kafkaConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3271
|
+
authConfig: {wire: 'auth_config', children: () => authConfigFieldMaskSchema},
|
|
3272
|
+
backfillSource: {
|
|
3273
|
+
wire: 'backfill_source',
|
|
3274
|
+
children: () => backfillSourceFieldMaskSchema,
|
|
3275
|
+
},
|
|
3276
|
+
bootstrapServers: {wire: 'bootstrap_servers'},
|
|
3277
|
+
extraOptions: {wire: 'extra_options'},
|
|
3278
|
+
keySchema: {wire: 'key_schema', children: () => schemaConfigFieldMaskSchema},
|
|
3279
|
+
name: {wire: 'name'},
|
|
3280
|
+
subscriptionMode: {
|
|
3281
|
+
wire: 'subscription_mode',
|
|
3282
|
+
children: () => subscriptionModeFieldMaskSchema,
|
|
3283
|
+
},
|
|
3284
|
+
valueSchema: {
|
|
3285
|
+
wire: 'value_schema',
|
|
3286
|
+
children: () => schemaConfigFieldMaskSchema,
|
|
3287
|
+
},
|
|
3288
|
+
};
|
|
3289
|
+
|
|
3290
|
+
export function kafkaConfigFieldMask(
|
|
3291
|
+
...paths: string[]
|
|
3292
|
+
): FieldMask<KafkaConfig> {
|
|
3293
|
+
return FieldMask.build<KafkaConfig>(paths, kafkaConfigFieldMaskSchema);
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
const kafkaSourceFieldMaskSchema: FieldMaskSchema = {
|
|
3297
|
+
entityColumnIdentifiers: {wire: 'entity_column_identifiers'},
|
|
3298
|
+
filterCondition: {wire: 'filter_condition'},
|
|
3299
|
+
name: {wire: 'name'},
|
|
3300
|
+
timeseriesColumnIdentifier: {
|
|
3301
|
+
wire: 'timeseries_column_identifier',
|
|
3302
|
+
children: () => columnIdentifierFieldMaskSchema,
|
|
3303
|
+
},
|
|
3304
|
+
};
|
|
3305
|
+
|
|
3306
|
+
const kafkaStreamConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3307
|
+
extraOptions: {wire: 'extra_options'},
|
|
3308
|
+
subscriptionMode: {
|
|
3309
|
+
wire: 'subscription_mode',
|
|
3310
|
+
children: () => kafkaSubscriptionModeFieldMaskSchema,
|
|
3311
|
+
},
|
|
3312
|
+
};
|
|
3313
|
+
|
|
3314
|
+
const kafkaSubscriptionModeFieldMaskSchema: FieldMaskSchema = {
|
|
3315
|
+
assign: {wire: 'assign'},
|
|
3316
|
+
subscribe: {wire: 'subscribe'},
|
|
3317
|
+
subscribePattern: {wire: 'subscribe_pattern'},
|
|
3318
|
+
};
|
|
3319
|
+
|
|
3320
|
+
const lastFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3321
|
+
input: {wire: 'input'},
|
|
3322
|
+
};
|
|
3323
|
+
|
|
3324
|
+
const lineageContextFieldMaskSchema: FieldMaskSchema = {
|
|
3325
|
+
jobContext: {wire: 'job_context', children: () => jobContextFieldMaskSchema},
|
|
3326
|
+
notebookId: {wire: 'notebook_id'},
|
|
3327
|
+
};
|
|
3328
|
+
|
|
3329
|
+
const materializedFeatureFieldMaskSchema: FieldMaskSchema = {
|
|
3330
|
+
cronSchedule: {wire: 'cron_schedule'},
|
|
3331
|
+
cronScheduleTrigger: {
|
|
3332
|
+
wire: 'cron_schedule_trigger',
|
|
3333
|
+
children: () => cronScheduleFieldMaskSchema,
|
|
3334
|
+
},
|
|
3335
|
+
featureName: {wire: 'feature_name'},
|
|
3336
|
+
isOnline: {wire: 'is_online'},
|
|
3337
|
+
lastMaterializationTime: {wire: 'last_materialization_time'},
|
|
3338
|
+
materializedFeatureId: {wire: 'materialized_feature_id'},
|
|
3339
|
+
offlineStoreConfig: {
|
|
3340
|
+
wire: 'offline_store_config',
|
|
3341
|
+
children: () => offlineStoreConfigFieldMaskSchema,
|
|
3342
|
+
},
|
|
3343
|
+
onlineStoreConfig: {
|
|
3344
|
+
wire: 'online_store_config',
|
|
3345
|
+
children: () => onlineStoreConfigFieldMaskSchema,
|
|
3346
|
+
},
|
|
3347
|
+
pipelineScheduleState: {wire: 'pipeline_schedule_state'},
|
|
3348
|
+
streamingMode: {
|
|
3349
|
+
wire: 'streaming_mode',
|
|
3350
|
+
children: () => streamingModeFieldMaskSchema,
|
|
3351
|
+
},
|
|
3352
|
+
tableName: {wire: 'table_name'},
|
|
3353
|
+
tableTrigger: {
|
|
3354
|
+
wire: 'table_trigger',
|
|
3355
|
+
children: () => tableTriggerFieldMaskSchema,
|
|
3356
|
+
},
|
|
3357
|
+
};
|
|
3358
|
+
|
|
3359
|
+
export function materializedFeatureFieldMask(
|
|
3360
|
+
...paths: string[]
|
|
3361
|
+
): FieldMask<MaterializedFeature> {
|
|
3362
|
+
return FieldMask.build<MaterializedFeature>(
|
|
3363
|
+
paths,
|
|
3364
|
+
materializedFeatureFieldMaskSchema
|
|
3365
|
+
);
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
const maxFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3369
|
+
input: {wire: 'input'},
|
|
3370
|
+
};
|
|
3371
|
+
|
|
3372
|
+
const minFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3373
|
+
input: {wire: 'input'},
|
|
3374
|
+
};
|
|
3375
|
+
|
|
3376
|
+
const mtlsConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3377
|
+
disableHostnameVerification: {wire: 'disable_hostname_verification'},
|
|
3378
|
+
keyPasswordRef: {
|
|
3379
|
+
wire: 'key_password_ref',
|
|
3380
|
+
children: () => secretScopeReferenceFieldMaskSchema,
|
|
3381
|
+
},
|
|
3382
|
+
keystoreLocation: {wire: 'keystore_location'},
|
|
3383
|
+
keystorePasswordRef: {
|
|
3384
|
+
wire: 'keystore_password_ref',
|
|
3385
|
+
children: () => secretScopeReferenceFieldMaskSchema,
|
|
3386
|
+
},
|
|
3387
|
+
truststoreLocation: {wire: 'truststore_location'},
|
|
3388
|
+
truststorePasswordRef: {
|
|
3389
|
+
wire: 'truststore_password_ref',
|
|
3390
|
+
children: () => secretScopeReferenceFieldMaskSchema,
|
|
3391
|
+
},
|
|
3392
|
+
};
|
|
3393
|
+
|
|
3394
|
+
const offlineStoreConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3395
|
+
catalogName: {wire: 'catalog_name'},
|
|
3396
|
+
schemaName: {wire: 'schema_name'},
|
|
3397
|
+
tableNamePrefix: {wire: 'table_name_prefix'},
|
|
3398
|
+
};
|
|
3399
|
+
|
|
3400
|
+
const onlineStoreConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3401
|
+
catalogName: {wire: 'catalog_name'},
|
|
3402
|
+
onlineStoreName: {wire: 'online_store_name'},
|
|
3403
|
+
schemaName: {wire: 'schema_name'},
|
|
3404
|
+
tableNamePrefix: {wire: 'table_name_prefix'},
|
|
3405
|
+
};
|
|
3406
|
+
|
|
3407
|
+
const requestSourceFieldMaskSchema: FieldMaskSchema = {
|
|
3408
|
+
flatSchema: {wire: 'flat_schema', children: () => flatSchemaFieldMaskSchema},
|
|
3409
|
+
};
|
|
3410
|
+
|
|
3411
|
+
const rollingWindowFieldMaskSchema: FieldMaskSchema = {
|
|
3412
|
+
delay: {wire: 'delay'},
|
|
3413
|
+
windowDuration: {wire: 'window_duration'},
|
|
3414
|
+
};
|
|
3415
|
+
|
|
3416
|
+
const schemaConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3417
|
+
jsonSchema: {wire: 'json_schema'},
|
|
3418
|
+
};
|
|
3419
|
+
|
|
3420
|
+
const secretScopeReferenceFieldMaskSchema: FieldMaskSchema = {
|
|
3421
|
+
key: {wire: 'key'},
|
|
3422
|
+
scope: {wire: 'scope'},
|
|
3423
|
+
};
|
|
3424
|
+
|
|
3425
|
+
const slidingWindowFieldMaskSchema: FieldMaskSchema = {
|
|
3426
|
+
slideDuration: {wire: 'slide_duration'},
|
|
3427
|
+
windowDuration: {wire: 'window_duration'},
|
|
3428
|
+
};
|
|
3429
|
+
|
|
3430
|
+
const stddevPopFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3431
|
+
input: {wire: 'input'},
|
|
3432
|
+
};
|
|
3433
|
+
|
|
3434
|
+
const stddevSampFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3435
|
+
input: {wire: 'input'},
|
|
3436
|
+
};
|
|
3437
|
+
|
|
3438
|
+
const streamFieldMaskSchema: FieldMaskSchema = {
|
|
3439
|
+
browseOnly: {wire: 'browse_only'},
|
|
3440
|
+
connectionConfig: {
|
|
3441
|
+
wire: 'connection_config',
|
|
3442
|
+
children: () => streamConnectionConfigFieldMaskSchema,
|
|
3443
|
+
},
|
|
3444
|
+
createTime: {wire: 'create_time'},
|
|
3445
|
+
createdBy: {wire: 'created_by'},
|
|
3446
|
+
description: {wire: 'description'},
|
|
3447
|
+
ingestionConfig: {
|
|
3448
|
+
wire: 'ingestion_config',
|
|
3449
|
+
children: () => ingestionConfigFieldMaskSchema,
|
|
3450
|
+
},
|
|
3451
|
+
name: {wire: 'name'},
|
|
3452
|
+
schemaConfig: {
|
|
3453
|
+
wire: 'schema_config',
|
|
3454
|
+
children: () => streamSchemaConfigFieldMaskSchema,
|
|
3455
|
+
},
|
|
3456
|
+
sourceConfig: {
|
|
3457
|
+
wire: 'source_config',
|
|
3458
|
+
children: () => streamSourceConfigFieldMaskSchema,
|
|
3459
|
+
},
|
|
3460
|
+
updateTime: {wire: 'update_time'},
|
|
3461
|
+
updatedBy: {wire: 'updated_by'},
|
|
3462
|
+
};
|
|
3463
|
+
|
|
3464
|
+
export function streamFieldMask(...paths: string[]): FieldMask<Stream> {
|
|
3465
|
+
return FieldMask.build<Stream>(paths, streamFieldMaskSchema);
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
const streamConnectionConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3469
|
+
directMtlsConfig: {
|
|
3470
|
+
wire: 'direct_mtls_config',
|
|
3471
|
+
children: () => directMtlsConfigFieldMaskSchema,
|
|
3472
|
+
},
|
|
3473
|
+
ucConnectionName: {wire: 'uc_connection_name'},
|
|
3474
|
+
};
|
|
3475
|
+
|
|
3476
|
+
const streamSchemaConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3477
|
+
directSchemas: {
|
|
3478
|
+
wire: 'direct_schemas',
|
|
3479
|
+
children: () => directSchemasFieldMaskSchema,
|
|
3480
|
+
},
|
|
3481
|
+
};
|
|
3482
|
+
|
|
3483
|
+
const streamSourceConfigFieldMaskSchema: FieldMaskSchema = {
|
|
3484
|
+
kafkaStreamConfig: {
|
|
3485
|
+
wire: 'kafka_stream_config',
|
|
3486
|
+
children: () => kafkaStreamConfigFieldMaskSchema,
|
|
3487
|
+
},
|
|
3488
|
+
};
|
|
3489
|
+
|
|
3490
|
+
const streamingModeFieldMaskSchema: FieldMaskSchema = {
|
|
3491
|
+
mode: {wire: 'mode'},
|
|
3492
|
+
};
|
|
3493
|
+
|
|
3494
|
+
const subscriptionModeFieldMaskSchema: FieldMaskSchema = {
|
|
3495
|
+
assign: {wire: 'assign'},
|
|
3496
|
+
subscribe: {wire: 'subscribe'},
|
|
3497
|
+
subscribePattern: {wire: 'subscribe_pattern'},
|
|
3498
|
+
};
|
|
3499
|
+
|
|
3500
|
+
const sumFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3501
|
+
input: {wire: 'input'},
|
|
3502
|
+
};
|
|
3503
|
+
|
|
3504
|
+
const tableTriggerFieldMaskSchema: FieldMaskSchema = {};
|
|
3505
|
+
|
|
3506
|
+
const timeWindowFieldMaskSchema: FieldMaskSchema = {
|
|
3507
|
+
continuous: {
|
|
3508
|
+
wire: 'continuous',
|
|
3509
|
+
children: () => continuousWindowFieldMaskSchema,
|
|
3510
|
+
},
|
|
3511
|
+
rolling: {wire: 'rolling', children: () => rollingWindowFieldMaskSchema},
|
|
3512
|
+
sliding: {wire: 'sliding', children: () => slidingWindowFieldMaskSchema},
|
|
3513
|
+
tumbling: {wire: 'tumbling', children: () => tumblingWindowFieldMaskSchema},
|
|
3514
|
+
};
|
|
3515
|
+
|
|
3516
|
+
const timeseriesColumnFieldMaskSchema: FieldMaskSchema = {
|
|
3517
|
+
name: {wire: 'name'},
|
|
3518
|
+
};
|
|
3519
|
+
|
|
3520
|
+
const tumblingWindowFieldMaskSchema: FieldMaskSchema = {
|
|
3521
|
+
windowDuration: {wire: 'window_duration'},
|
|
3522
|
+
};
|
|
3523
|
+
|
|
3524
|
+
const varPopFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3525
|
+
input: {wire: 'input'},
|
|
3526
|
+
};
|
|
3527
|
+
|
|
3528
|
+
const varSampFunctionFieldMaskSchema: FieldMaskSchema = {
|
|
3529
|
+
input: {wire: 'input'},
|
|
3530
|
+
};
|