@databricks/sdk-features 0.1.0-dev.3 → 0.1.0-dev.5
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/README.md +28 -0
- package/dist/v1/client.d.ts +3 -3
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +116 -97
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +1 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/model.d.ts +93 -53
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +98 -61
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +30 -2
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +33 -16
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +2 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +9 -5
- package/src/v1/client.ts +0 -873
- package/src/v1/index.ts +0 -105
- package/src/v1/model.ts +0 -3530
- package/src/v1/transport.ts +0 -73
- package/src/v1/utils.ts +0 -156
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
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 --
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
45
|
+
PIPELINE_SCHEDULE_STATE_UNSPECIFIED: 'PIPELINE_SCHEDULE_STATE_UNSPECIFIED',
|
|
48
46
|
/** Pipeline was configured to run once then stop. */
|
|
49
|
-
|
|
47
|
+
SNAPSHOT: 'SNAPSHOT',
|
|
50
48
|
/** Pipeline is actively running and computing features. */
|
|
51
|
-
|
|
49
|
+
ACTIVE: 'ACTIVE',
|
|
52
50
|
/** Pipeline is paused and not computing features. */
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention --
|
|
56
|
-
export
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
71
|
-
}
|
|
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.
|
|
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.
|
|
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,15 @@ 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
|
+
filter_condition: z.string().optional(),
|
|
851
|
+
})
|
|
852
|
+
.transform(d => ({
|
|
853
|
+
fullName: d.full_name,
|
|
854
|
+
filterCondition: d.filter_condition,
|
|
855
|
+
}));
|
|
847
856
|
export const unmarshalStreamSourceConfigSchema = z
|
|
848
857
|
.object({
|
|
849
858
|
kafka_stream_config: z
|
|
@@ -860,7 +869,7 @@ export const unmarshalStreamSourceConfigSchema = z
|
|
|
860
869
|
}));
|
|
861
870
|
export const unmarshalStreamingModeSchema = z
|
|
862
871
|
.object({
|
|
863
|
-
mode: z.
|
|
872
|
+
mode: z.string().optional(),
|
|
864
873
|
})
|
|
865
874
|
.transform(d => ({
|
|
866
875
|
mode: d.mode,
|
|
@@ -1176,6 +1185,10 @@ export const marshalDataSourceSchema = z
|
|
|
1176
1185
|
$case: z.literal('requestSource'),
|
|
1177
1186
|
requestSource: z.lazy(() => marshalRequestSourceSchema),
|
|
1178
1187
|
}),
|
|
1188
|
+
z.object({
|
|
1189
|
+
$case: z.literal('streamSource'),
|
|
1190
|
+
streamSource: z.lazy(() => marshalStreamSourceSchema),
|
|
1191
|
+
}),
|
|
1179
1192
|
])
|
|
1180
1193
|
.optional(),
|
|
1181
1194
|
})
|
|
@@ -1189,6 +1202,9 @@ export const marshalDataSourceSchema = z
|
|
|
1189
1202
|
...(d.dataSource?.$case === 'requestSource' && {
|
|
1190
1203
|
request_source: d.dataSource.requestSource,
|
|
1191
1204
|
}),
|
|
1205
|
+
...(d.dataSource?.$case === 'streamSource' && {
|
|
1206
|
+
stream_source: d.dataSource.streamSource,
|
|
1207
|
+
}),
|
|
1192
1208
|
}));
|
|
1193
1209
|
export const marshalDeltaTableSourceSchema = z
|
|
1194
1210
|
.object({
|
|
@@ -1273,7 +1289,7 @@ export const marshalFeatureSchema = z
|
|
|
1273
1289
|
export const marshalFieldDefinitionSchema = z
|
|
1274
1290
|
.object({
|
|
1275
1291
|
name: z.string().optional(),
|
|
1276
|
-
dataType: z.
|
|
1292
|
+
dataType: z.string().optional(),
|
|
1277
1293
|
})
|
|
1278
1294
|
.transform(d => ({
|
|
1279
1295
|
name: d.name,
|
|
@@ -1295,7 +1311,7 @@ export const marshalFlatSchemaSchema = z
|
|
|
1295
1311
|
}));
|
|
1296
1312
|
export const marshalFunctionSchema = z
|
|
1297
1313
|
.object({
|
|
1298
|
-
functionType: z.
|
|
1314
|
+
functionType: z.string().optional(),
|
|
1299
1315
|
extraParameters: z
|
|
1300
1316
|
.array(z.lazy(() => marshalFunction_ExtraParameterSchema))
|
|
1301
1317
|
.optional(),
|
|
@@ -1386,6 +1402,7 @@ export const marshalKafkaConfigSchema = z
|
|
|
1386
1402
|
valueSchema: z.lazy(() => marshalSchemaConfigSchema).optional(),
|
|
1387
1403
|
extraOptions: z.record(z.string(), z.string()).optional(),
|
|
1388
1404
|
backfillSource: z.lazy(() => marshalBackfillSourceSchema).optional(),
|
|
1405
|
+
ingestionConfig: z.lazy(() => marshalIngestionConfigSchema).optional(),
|
|
1389
1406
|
})
|
|
1390
1407
|
.transform(d => ({
|
|
1391
1408
|
name: d.name,
|
|
@@ -1396,6 +1413,7 @@ export const marshalKafkaConfigSchema = z
|
|
|
1396
1413
|
value_schema: d.valueSchema,
|
|
1397
1414
|
extra_options: d.extraOptions,
|
|
1398
1415
|
backfill_source: d.backfillSource,
|
|
1416
|
+
ingestion_config: d.ingestionConfig,
|
|
1399
1417
|
}));
|
|
1400
1418
|
export const marshalKafkaSourceSchema = z
|
|
1401
1419
|
.object({
|
|
@@ -1482,9 +1500,7 @@ export const marshalMaterializedFeatureSchema = z
|
|
|
1482
1500
|
])
|
|
1483
1501
|
.optional(),
|
|
1484
1502
|
tableName: z.string().optional(),
|
|
1485
|
-
pipelineScheduleState: z
|
|
1486
|
-
.enum(MaterializedFeature_PipelineScheduleState)
|
|
1487
|
-
.optional(),
|
|
1503
|
+
pipelineScheduleState: z.string().optional(),
|
|
1488
1504
|
lastMaterializationTime: z
|
|
1489
1505
|
.any()
|
|
1490
1506
|
.transform((d) => d.toString())
|
|
@@ -1743,6 +1759,15 @@ export const marshalStreamSchemaConfigSchema = z
|
|
|
1743
1759
|
direct_schemas: d.schemaConfig.directSchemas,
|
|
1744
1760
|
}),
|
|
1745
1761
|
}));
|
|
1762
|
+
export const marshalStreamSourceSchema = z
|
|
1763
|
+
.object({
|
|
1764
|
+
fullName: z.string().optional(),
|
|
1765
|
+
filterCondition: z.string().optional(),
|
|
1766
|
+
})
|
|
1767
|
+
.transform(d => ({
|
|
1768
|
+
full_name: d.fullName,
|
|
1769
|
+
filter_condition: d.filterCondition,
|
|
1770
|
+
}));
|
|
1746
1771
|
export const marshalStreamSourceConfigSchema = z
|
|
1747
1772
|
.object({
|
|
1748
1773
|
sourceConfig: z
|
|
@@ -1761,7 +1786,7 @@ export const marshalStreamSourceConfigSchema = z
|
|
|
1761
1786
|
}));
|
|
1762
1787
|
export const marshalStreamingModeSchema = z
|
|
1763
1788
|
.object({
|
|
1764
|
-
mode: z.
|
|
1789
|
+
mode: z.string().optional(),
|
|
1765
1790
|
})
|
|
1766
1791
|
.transform(d => ({
|
|
1767
1792
|
mode: d.mode,
|
|
@@ -1945,6 +1970,10 @@ const dataSourceFieldMaskSchema = {
|
|
|
1945
1970
|
wire: 'request_source',
|
|
1946
1971
|
children: () => requestSourceFieldMaskSchema,
|
|
1947
1972
|
},
|
|
1973
|
+
streamSource: {
|
|
1974
|
+
wire: 'stream_source',
|
|
1975
|
+
children: () => streamSourceFieldMaskSchema,
|
|
1976
|
+
},
|
|
1948
1977
|
};
|
|
1949
1978
|
const deltaTableSourceFieldMaskSchema = {
|
|
1950
1979
|
dataframeSchema: { wire: 'dataframe_schema' },
|
|
@@ -2038,6 +2067,10 @@ const kafkaConfigFieldMaskSchema = {
|
|
|
2038
2067
|
},
|
|
2039
2068
|
bootstrapServers: { wire: 'bootstrap_servers' },
|
|
2040
2069
|
extraOptions: { wire: 'extra_options' },
|
|
2070
|
+
ingestionConfig: {
|
|
2071
|
+
wire: 'ingestion_config',
|
|
2072
|
+
children: () => ingestionConfigFieldMaskSchema,
|
|
2073
|
+
},
|
|
2041
2074
|
keySchema: { wire: 'key_schema', children: () => schemaConfigFieldMaskSchema },
|
|
2042
2075
|
name: { wire: 'name' },
|
|
2043
2076
|
subscriptionMode: {
|
|
@@ -2211,6 +2244,10 @@ const streamSchemaConfigFieldMaskSchema = {
|
|
|
2211
2244
|
children: () => directSchemasFieldMaskSchema,
|
|
2212
2245
|
},
|
|
2213
2246
|
};
|
|
2247
|
+
const streamSourceFieldMaskSchema = {
|
|
2248
|
+
filterCondition: { wire: 'filter_condition' },
|
|
2249
|
+
fullName: { wire: 'full_name' },
|
|
2250
|
+
};
|
|
2214
2251
|
const streamSourceConfigFieldMaskSchema = {
|
|
2215
2252
|
kafkaStreamConfig: {
|
|
2216
2253
|
wire: 'kafka_stream_config',
|