@databricks/sdk-features 0.1.0-dev.3 → 0.1.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/v1/model.js CHANGED
@@ -6,69 +6,66 @@ import { z } from 'zod';
6
6
  * Scalar data types for request-time field definitions.
7
7
  * Only flat (non-nested) types are supported.
8
8
  */
9
- export var ScalarDataType;
10
- (function (ScalarDataType) {
11
- ScalarDataType["SCALAR_DATA_TYPE_UNSPECIFIED"] = "SCALAR_DATA_TYPE_UNSPECIFIED";
12
- ScalarDataType["INTEGER"] = "INTEGER";
13
- ScalarDataType["FLOAT"] = "FLOAT";
14
- ScalarDataType["BOOLEAN"] = "BOOLEAN";
15
- ScalarDataType["STRING"] = "STRING";
16
- ScalarDataType["DOUBLE"] = "DOUBLE";
17
- ScalarDataType["LONG"] = "LONG";
18
- ScalarDataType["TIMESTAMP"] = "TIMESTAMP";
19
- ScalarDataType["DATE"] = "DATE";
20
- ScalarDataType["SHORT"] = "SHORT";
21
- ScalarDataType["BINARY"] = "BINARY";
22
- ScalarDataType["DECIMAL"] = "DECIMAL";
23
- })(ScalarDataType || (ScalarDataType = {}));
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
10
+ export const ScalarDataType = {
11
+ SCALAR_DATA_TYPE_UNSPECIFIED: 'SCALAR_DATA_TYPE_UNSPECIFIED',
12
+ INTEGER: 'INTEGER',
13
+ FLOAT: 'FLOAT',
14
+ BOOLEAN: 'BOOLEAN',
15
+ STRING: 'STRING',
16
+ DOUBLE: 'DOUBLE',
17
+ LONG: 'LONG',
18
+ TIMESTAMP: 'TIMESTAMP',
19
+ DATE: 'DATE',
20
+ SHORT: 'SHORT',
21
+ BINARY: 'BINARY',
22
+ DECIMAL: 'DECIMAL',
23
+ };
24
24
  /** Deprecated: Use the function-specific messages in AggregationFunction.function_type oneof instead. Kept for backwards compatibility. */
25
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
26
- export var Function_FunctionType;
27
- (function (Function_FunctionType) {
28
- Function_FunctionType["FUNCTION_TYPE_UNSPECIFIED"] = "FUNCTION_TYPE_UNSPECIFIED";
29
- Function_FunctionType["AVG"] = "AVG";
30
- Function_FunctionType["COUNT"] = "COUNT";
31
- Function_FunctionType["SUM"] = "SUM";
32
- Function_FunctionType["MIN"] = "MIN";
33
- Function_FunctionType["MAX"] = "MAX";
34
- Function_FunctionType["FIRST"] = "FIRST";
35
- Function_FunctionType["LAST"] = "LAST";
36
- Function_FunctionType["APPROX_COUNT_DISTINCT"] = "APPROX_COUNT_DISTINCT";
37
- Function_FunctionType["APPROX_PERCENTILE"] = "APPROX_PERCENTILE";
38
- Function_FunctionType["STDDEV_POP"] = "STDDEV_POP";
39
- Function_FunctionType["STDDEV_SAMP"] = "STDDEV_SAMP";
40
- Function_FunctionType["VAR_POP"] = "VAR_POP";
41
- Function_FunctionType["VAR_SAMP"] = "VAR_SAMP";
42
- })(Function_FunctionType || (Function_FunctionType = {}));
43
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
44
- export var MaterializedFeature_PipelineScheduleState;
45
- (function (MaterializedFeature_PipelineScheduleState) {
25
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
26
+ export const Function_FunctionType = {
27
+ FUNCTION_TYPE_UNSPECIFIED: 'FUNCTION_TYPE_UNSPECIFIED',
28
+ AVG: 'AVG',
29
+ COUNT: 'COUNT',
30
+ SUM: 'SUM',
31
+ MIN: 'MIN',
32
+ MAX: 'MAX',
33
+ FIRST: 'FIRST',
34
+ LAST: 'LAST',
35
+ APPROX_COUNT_DISTINCT: 'APPROX_COUNT_DISTINCT',
36
+ APPROX_PERCENTILE: 'APPROX_PERCENTILE',
37
+ STDDEV_POP: 'STDDEV_POP',
38
+ STDDEV_SAMP: 'STDDEV_SAMP',
39
+ VAR_POP: 'VAR_POP',
40
+ VAR_SAMP: 'VAR_SAMP',
41
+ };
42
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
43
+ export const MaterializedFeature_PipelineScheduleState = {
46
44
  /** Default value, not used. */
47
- MaterializedFeature_PipelineScheduleState["PIPELINE_SCHEDULE_STATE_UNSPECIFIED"] = "PIPELINE_SCHEDULE_STATE_UNSPECIFIED";
45
+ PIPELINE_SCHEDULE_STATE_UNSPECIFIED: 'PIPELINE_SCHEDULE_STATE_UNSPECIFIED',
48
46
  /** Pipeline was configured to run once then stop. */
49
- MaterializedFeature_PipelineScheduleState["SNAPSHOT"] = "SNAPSHOT";
47
+ SNAPSHOT: 'SNAPSHOT',
50
48
  /** Pipeline is actively running and computing features. */
51
- MaterializedFeature_PipelineScheduleState["ACTIVE"] = "ACTIVE";
49
+ ACTIVE: 'ACTIVE',
52
50
  /** Pipeline is paused and not computing features. */
53
- MaterializedFeature_PipelineScheduleState["PAUSED"] = "PAUSED";
54
- })(MaterializedFeature_PipelineScheduleState || (MaterializedFeature_PipelineScheduleState = {}));
55
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
56
- export var StreamingMode_StreamingModeType;
57
- (function (StreamingMode_StreamingModeType) {
51
+ PAUSED: 'PAUSED',
52
+ };
53
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
54
+ export const StreamingMode_StreamingModeType = {
58
55
  /** Default value, not used. */
59
- StreamingMode_StreamingModeType["STREAMING_MODE_TYPE_UNSPECIFIED"] = "STREAMING_MODE_TYPE_UNSPECIFIED";
56
+ STREAMING_MODE_TYPE_UNSPECIFIED: 'STREAMING_MODE_TYPE_UNSPECIFIED',
60
57
  /**
61
58
  * Real-time mode. Ultra-low-latency trigger intended for operational workloads
62
59
  * that need responses in milliseconds or sub-second latency.
63
60
  */
64
- StreamingMode_StreamingModeType["STREAMING_MODE_TYPE_RTM"] = "STREAMING_MODE_TYPE_RTM";
61
+ STREAMING_MODE_TYPE_RTM: 'STREAMING_MODE_TYPE_RTM',
65
62
  /**
66
63
  * Micro-batch mode in Structured Streaming. Better suited for ETL and analytics
67
64
  * workloads where latency is measured in seconds or minutes and cost efficiency
68
65
  * matters more.
69
66
  */
70
- StreamingMode_StreamingModeType["STREAMING_MODE_TYPE_MBM"] = "STREAMING_MODE_TYPE_MBM";
71
- })(StreamingMode_StreamingModeType || (StreamingMode_StreamingModeType = {}));
67
+ STREAMING_MODE_TYPE_MBM: 'STREAMING_MODE_TYPE_MBM',
68
+ };
72
69
  export const unmarshalAggregationFunctionSchema = z
73
70
  .object({
74
71
  avg: z.lazy(() => unmarshalAvgFunctionSchema).optional(),
@@ -259,6 +256,7 @@ export const unmarshalDataSourceSchema = z
259
256
  .optional(),
260
257
  kafka_source: z.lazy(() => unmarshalKafkaSourceSchema).optional(),
261
258
  request_source: z.lazy(() => unmarshalRequestSourceSchema).optional(),
259
+ stream_source: z.lazy(() => unmarshalStreamSourceSchema).optional(),
262
260
  })
263
261
  .transform(d => ({
264
262
  dataSource: d.delta_table_source !== undefined
@@ -270,7 +268,9 @@ export const unmarshalDataSourceSchema = z
270
268
  ? { $case: 'kafkaSource', kafkaSource: d.kafka_source }
271
269
  : d.request_source !== undefined
272
270
  ? { $case: 'requestSource', requestSource: d.request_source }
273
- : undefined,
271
+ : d.stream_source !== undefined
272
+ ? { $case: 'streamSource', streamSource: d.stream_source }
273
+ : undefined,
274
274
  }));
275
275
  export const unmarshalDeltaTableSourceSchema = z
276
276
  .object({
@@ -355,7 +355,7 @@ export const unmarshalFeatureSchema = z
355
355
  export const unmarshalFieldDefinitionSchema = z
356
356
  .object({
357
357
  name: z.string().optional(),
358
- data_type: z.enum(ScalarDataType).optional(),
358
+ data_type: z.string().optional(),
359
359
  })
360
360
  .transform(d => ({
361
361
  name: d.name,
@@ -377,7 +377,7 @@ export const unmarshalFlatSchemaSchema = z
377
377
  }));
378
378
  export const unmarshalFunctionSchema = z
379
379
  .object({
380
- function_type: z.enum(Function_FunctionType).optional(),
380
+ function_type: z.string().optional(),
381
381
  extra_parameters: z
382
382
  .array(z.lazy(() => unmarshalFunction_ExtraParameterSchema))
383
383
  .optional(),
@@ -473,6 +473,7 @@ export const unmarshalKafkaConfigSchema = z
473
473
  value_schema: z.lazy(() => unmarshalSchemaConfigSchema).optional(),
474
474
  extra_options: z.record(z.string(), z.string()).optional(),
475
475
  backfill_source: z.lazy(() => unmarshalBackfillSourceSchema).optional(),
476
+ ingestion_config: z.lazy(() => unmarshalIngestionConfigSchema).optional(),
476
477
  })
477
478
  .transform(d => ({
478
479
  name: d.name,
@@ -483,6 +484,7 @@ export const unmarshalKafkaConfigSchema = z
483
484
  valueSchema: d.value_schema,
484
485
  extraOptions: d.extra_options,
485
486
  backfillSource: d.backfill_source,
487
+ ingestionConfig: d.ingestion_config,
486
488
  }));
487
489
  export const unmarshalKafkaSourceSchema = z
488
490
  .object({
@@ -600,9 +602,7 @@ export const unmarshalMaterializedFeatureSchema = z
600
602
  .lazy(() => unmarshalOnlineStoreConfigSchema)
601
603
  .optional(),
602
604
  table_name: z.string().optional(),
603
- pipeline_schedule_state: z
604
- .enum(MaterializedFeature_PipelineScheduleState)
605
- .optional(),
605
+ pipeline_schedule_state: z.string().optional(),
606
606
  last_materialization_time: z
607
607
  .string()
608
608
  .transform(s => Temporal.Instant.from(s))
@@ -844,6 +844,13 @@ export const unmarshalStreamSchemaConfigSchema = z
844
844
  ? { $case: 'directSchemas', directSchemas: d.direct_schemas }
845
845
  : undefined,
846
846
  }));
847
+ export const unmarshalStreamSourceSchema = z
848
+ .object({
849
+ full_name: z.string().optional(),
850
+ })
851
+ .transform(d => ({
852
+ fullName: d.full_name,
853
+ }));
847
854
  export const unmarshalStreamSourceConfigSchema = z
848
855
  .object({
849
856
  kafka_stream_config: z
@@ -860,7 +867,7 @@ export const unmarshalStreamSourceConfigSchema = z
860
867
  }));
861
868
  export const unmarshalStreamingModeSchema = z
862
869
  .object({
863
- mode: z.enum(StreamingMode_StreamingModeType).optional(),
870
+ mode: z.string().optional(),
864
871
  })
865
872
  .transform(d => ({
866
873
  mode: d.mode,
@@ -1176,6 +1183,10 @@ export const marshalDataSourceSchema = z
1176
1183
  $case: z.literal('requestSource'),
1177
1184
  requestSource: z.lazy(() => marshalRequestSourceSchema),
1178
1185
  }),
1186
+ z.object({
1187
+ $case: z.literal('streamSource'),
1188
+ streamSource: z.lazy(() => marshalStreamSourceSchema),
1189
+ }),
1179
1190
  ])
1180
1191
  .optional(),
1181
1192
  })
@@ -1189,6 +1200,9 @@ export const marshalDataSourceSchema = z
1189
1200
  ...(d.dataSource?.$case === 'requestSource' && {
1190
1201
  request_source: d.dataSource.requestSource,
1191
1202
  }),
1203
+ ...(d.dataSource?.$case === 'streamSource' && {
1204
+ stream_source: d.dataSource.streamSource,
1205
+ }),
1192
1206
  }));
1193
1207
  export const marshalDeltaTableSourceSchema = z
1194
1208
  .object({
@@ -1273,7 +1287,7 @@ export const marshalFeatureSchema = z
1273
1287
  export const marshalFieldDefinitionSchema = z
1274
1288
  .object({
1275
1289
  name: z.string().optional(),
1276
- dataType: z.enum(ScalarDataType).optional(),
1290
+ dataType: z.string().optional(),
1277
1291
  })
1278
1292
  .transform(d => ({
1279
1293
  name: d.name,
@@ -1295,7 +1309,7 @@ export const marshalFlatSchemaSchema = z
1295
1309
  }));
1296
1310
  export const marshalFunctionSchema = z
1297
1311
  .object({
1298
- functionType: z.enum(Function_FunctionType).optional(),
1312
+ functionType: z.string().optional(),
1299
1313
  extraParameters: z
1300
1314
  .array(z.lazy(() => marshalFunction_ExtraParameterSchema))
1301
1315
  .optional(),
@@ -1386,6 +1400,7 @@ export const marshalKafkaConfigSchema = z
1386
1400
  valueSchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
1387
1401
  extraOptions: z.record(z.string(), z.string()).optional(),
1388
1402
  backfillSource: z.lazy(() => marshalBackfillSourceSchema).optional(),
1403
+ ingestionConfig: z.lazy(() => marshalIngestionConfigSchema).optional(),
1389
1404
  })
1390
1405
  .transform(d => ({
1391
1406
  name: d.name,
@@ -1396,6 +1411,7 @@ export const marshalKafkaConfigSchema = z
1396
1411
  value_schema: d.valueSchema,
1397
1412
  extra_options: d.extraOptions,
1398
1413
  backfill_source: d.backfillSource,
1414
+ ingestion_config: d.ingestionConfig,
1399
1415
  }));
1400
1416
  export const marshalKafkaSourceSchema = z
1401
1417
  .object({
@@ -1482,9 +1498,7 @@ export const marshalMaterializedFeatureSchema = z
1482
1498
  ])
1483
1499
  .optional(),
1484
1500
  tableName: z.string().optional(),
1485
- pipelineScheduleState: z
1486
- .enum(MaterializedFeature_PipelineScheduleState)
1487
- .optional(),
1501
+ pipelineScheduleState: z.string().optional(),
1488
1502
  lastMaterializationTime: z
1489
1503
  .any()
1490
1504
  .transform((d) => d.toString())
@@ -1743,6 +1757,13 @@ export const marshalStreamSchemaConfigSchema = z
1743
1757
  direct_schemas: d.schemaConfig.directSchemas,
1744
1758
  }),
1745
1759
  }));
1760
+ export const marshalStreamSourceSchema = z
1761
+ .object({
1762
+ fullName: z.string().optional(),
1763
+ })
1764
+ .transform(d => ({
1765
+ full_name: d.fullName,
1766
+ }));
1746
1767
  export const marshalStreamSourceConfigSchema = z
1747
1768
  .object({
1748
1769
  sourceConfig: z
@@ -1761,7 +1782,7 @@ export const marshalStreamSourceConfigSchema = z
1761
1782
  }));
1762
1783
  export const marshalStreamingModeSchema = z
1763
1784
  .object({
1764
- mode: z.enum(StreamingMode_StreamingModeType).optional(),
1785
+ mode: z.string().optional(),
1765
1786
  })
1766
1787
  .transform(d => ({
1767
1788
  mode: d.mode,
@@ -1945,6 +1966,10 @@ const dataSourceFieldMaskSchema = {
1945
1966
  wire: 'request_source',
1946
1967
  children: () => requestSourceFieldMaskSchema,
1947
1968
  },
1969
+ streamSource: {
1970
+ wire: 'stream_source',
1971
+ children: () => streamSourceFieldMaskSchema,
1972
+ },
1948
1973
  };
1949
1974
  const deltaTableSourceFieldMaskSchema = {
1950
1975
  dataframeSchema: { wire: 'dataframe_schema' },
@@ -2038,6 +2063,10 @@ const kafkaConfigFieldMaskSchema = {
2038
2063
  },
2039
2064
  bootstrapServers: { wire: 'bootstrap_servers' },
2040
2065
  extraOptions: { wire: 'extra_options' },
2066
+ ingestionConfig: {
2067
+ wire: 'ingestion_config',
2068
+ children: () => ingestionConfigFieldMaskSchema,
2069
+ },
2041
2070
  keySchema: { wire: 'key_schema', children: () => schemaConfigFieldMaskSchema },
2042
2071
  name: { wire: 'name' },
2043
2072
  subscriptionMode: {
@@ -2211,6 +2240,9 @@ const streamSchemaConfigFieldMaskSchema = {
2211
2240
  children: () => directSchemasFieldMaskSchema,
2212
2241
  },
2213
2242
  };
2243
+ const streamSourceFieldMaskSchema = {
2244
+ fullName: { wire: 'full_name' },
2245
+ };
2214
2246
  const streamSourceConfigFieldMaskSchema = {
2215
2247
  kafkaStreamConfig: {
2216
2248
  wire: 'kafka_stream_config',