@databricks/sdk-jobs 0.11.0 → 0.13.0
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/v2/index.d.ts +2 -2
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/index.js +1 -1
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/model.d.ts +86 -0
- package/dist/v2/model.d.ts.map +1 -1
- package/dist/v2/model.js +86 -0
- package/dist/v2/model.js.map +1 -1
- package/package.json +4 -4
package/dist/v2/model.js
CHANGED
|
@@ -257,6 +257,24 @@ export const Source = {
|
|
|
257
257
|
WORKSPACE: 'WORKSPACE',
|
|
258
258
|
GIT: 'GIT',
|
|
259
259
|
};
|
|
260
|
+
/**
|
|
261
|
+
* The strategy used to evaluate a SQL condition trigger against a query result set.
|
|
262
|
+
*
|
|
263
|
+
* * `SQL_CONDITION_TRIGGER_MODE_UNSPECIFIED`: Sentinel zero-value. Not a valid input — the
|
|
264
|
+
* validator rejects this when sent explicitly. Internally treated as `QUERY_RETURNS_ROWS`
|
|
265
|
+
* when reading legacy data that predates this field.
|
|
266
|
+
* * `QUERY_RETURNS_ROWS`: Fires whenever the result set has at least one row. Zero rows means
|
|
267
|
+
* the condition is not met. This is the original SQL condition behavior.
|
|
268
|
+
* * `RESULT_VALUE_CHANGES`: Fires whenever the query's single result value differs from the
|
|
269
|
+
* previous evaluation. The first evaluation always fires. Queries must return exactly one
|
|
270
|
+
* cell (one row, one column).
|
|
271
|
+
*/
|
|
272
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
273
|
+
export const SqlConditionTriggerMode = {
|
|
274
|
+
SQL_CONDITION_TRIGGER_MODE_UNSPECIFIED: 'SQL_CONDITION_TRIGGER_MODE_UNSPECIFIED',
|
|
275
|
+
QUERY_RETURNS_ROWS: 'QUERY_RETURNS_ROWS',
|
|
276
|
+
RESULT_VALUE_CHANGES: 'RESULT_VALUE_CHANGES',
|
|
277
|
+
};
|
|
260
278
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
261
279
|
export const StorageMode = {
|
|
262
280
|
DIRECT_QUERY: 'DIRECT_QUERY',
|
|
@@ -714,10 +732,12 @@ export const unmarshalAiRuntimeTaskOutputSchema = z
|
|
|
714
732
|
.object({
|
|
715
733
|
mlflow_experiment_id: z.string().optional(),
|
|
716
734
|
mlflow_run_id: z.string().optional(),
|
|
735
|
+
status_message: z.string().optional(),
|
|
717
736
|
})
|
|
718
737
|
.transform(d => ({
|
|
719
738
|
mlflowExperimentId: d.mlflow_experiment_id,
|
|
720
739
|
mlflowRunId: d.mlflow_run_id,
|
|
740
|
+
statusMessage: d.status_message,
|
|
721
741
|
}));
|
|
722
742
|
export const unmarshalAlertTaskSchema = z
|
|
723
743
|
.object({
|
|
@@ -1182,11 +1202,15 @@ export const unmarshalCronScheduleSchema = z
|
|
|
1182
1202
|
quartz_cron_expression: z.string().optional(),
|
|
1183
1203
|
timezone_id: z.string().optional(),
|
|
1184
1204
|
pause_status: z.string().optional(),
|
|
1205
|
+
sql_condition: z
|
|
1206
|
+
.lazy(() => unmarshalSqlConditionConfigurationSchema)
|
|
1207
|
+
.optional(),
|
|
1185
1208
|
})
|
|
1186
1209
|
.transform(d => ({
|
|
1187
1210
|
quartzCronExpression: d.quartz_cron_expression,
|
|
1188
1211
|
timezoneId: d.timezone_id,
|
|
1189
1212
|
pauseStatus: d.pause_status,
|
|
1213
|
+
sqlCondition: d.sql_condition,
|
|
1190
1214
|
}));
|
|
1191
1215
|
export const unmarshalDashboardPageSnapshotSchema = z
|
|
1192
1216
|
.object({
|
|
@@ -2998,12 +3022,16 @@ export const unmarshalRunTaskSchema = z
|
|
|
2998
3022
|
}));
|
|
2999
3023
|
export const unmarshalRunTriggerInfoSchema = z
|
|
3000
3024
|
.object({
|
|
3025
|
+
sql_condition: z
|
|
3026
|
+
.lazy(() => unmarshalSqlConditionRunInfoDetailsSchema)
|
|
3027
|
+
.optional(),
|
|
3001
3028
|
run_id: z
|
|
3002
3029
|
.union([z.number(), z.bigint()])
|
|
3003
3030
|
.transform(v => BigInt(v))
|
|
3004
3031
|
.optional(),
|
|
3005
3032
|
})
|
|
3006
3033
|
.transform(d => ({
|
|
3034
|
+
sqlCondition: d.sql_condition,
|
|
3007
3035
|
runId: d.run_id,
|
|
3008
3036
|
}));
|
|
3009
3037
|
export const unmarshalS3StorageInfoSchema = z
|
|
@@ -3063,6 +3091,39 @@ export const unmarshalSparseCheckoutSchema = z
|
|
|
3063
3091
|
.transform(d => ({
|
|
3064
3092
|
patterns: d.patterns,
|
|
3065
3093
|
}));
|
|
3094
|
+
export const unmarshalSqlConditionConfigurationSchema = z
|
|
3095
|
+
.object({
|
|
3096
|
+
sql_query_id: z.string().optional(),
|
|
3097
|
+
warehouse_id: z.string().optional(),
|
|
3098
|
+
trigger_mode: z.string().optional(),
|
|
3099
|
+
})
|
|
3100
|
+
.transform(d => ({
|
|
3101
|
+
sqlQueryId: d.sql_query_id,
|
|
3102
|
+
warehouseId: d.warehouse_id,
|
|
3103
|
+
triggerMode: d.trigger_mode,
|
|
3104
|
+
}));
|
|
3105
|
+
export const unmarshalSqlConditionRunInfoDetailsSchema = z
|
|
3106
|
+
.object({
|
|
3107
|
+
condition_evaluation_sql_statement_id: z.string().optional(),
|
|
3108
|
+
condition_evaluation_satisfied: z.boolean().optional(),
|
|
3109
|
+
condition_evaluation_sql_session_id: z.string().optional(),
|
|
3110
|
+
})
|
|
3111
|
+
.transform(d => ({
|
|
3112
|
+
conditionEvaluationSqlStatementId: d.condition_evaluation_sql_statement_id,
|
|
3113
|
+
conditionEvaluationSatisfied: d.condition_evaluation_satisfied,
|
|
3114
|
+
conditionEvaluationSqlSessionId: d.condition_evaluation_sql_session_id,
|
|
3115
|
+
}));
|
|
3116
|
+
export const unmarshalSqlConditionStateSchema = z
|
|
3117
|
+
.object({
|
|
3118
|
+
latest_condition_evaluation_sql_statement_id: z.string().optional(),
|
|
3119
|
+
latest_condition_evaluation_satisfied: z.boolean().optional(),
|
|
3120
|
+
latest_condition_evaluation_sql_session_id: z.string().optional(),
|
|
3121
|
+
})
|
|
3122
|
+
.transform(d => ({
|
|
3123
|
+
latestConditionEvaluationSqlStatementId: d.latest_condition_evaluation_sql_statement_id,
|
|
3124
|
+
latestConditionEvaluationSatisfied: d.latest_condition_evaluation_satisfied,
|
|
3125
|
+
latestConditionEvaluationSqlSessionId: d.latest_condition_evaluation_sql_session_id,
|
|
3126
|
+
}));
|
|
3066
3127
|
export const unmarshalSqlTaskSchema = z
|
|
3067
3128
|
.object({
|
|
3068
3129
|
parameters: z.record(z.string(), z.string()).optional(),
|
|
@@ -3538,6 +3599,9 @@ export const unmarshalTriggerSettingsSchema = z
|
|
|
3538
3599
|
.lazy(() => unmarshalTableTriggerConfigurationSchema)
|
|
3539
3600
|
.optional(),
|
|
3540
3601
|
model: z.lazy(() => unmarshalModelTriggerConfigurationSchema).optional(),
|
|
3602
|
+
sql_condition: z
|
|
3603
|
+
.lazy(() => unmarshalSqlConditionConfigurationSchema)
|
|
3604
|
+
.optional(),
|
|
3541
3605
|
})
|
|
3542
3606
|
.transform(d => ({
|
|
3543
3607
|
pauseStatus: d.pause_status,
|
|
@@ -3550,6 +3614,7 @@ export const unmarshalTriggerSettingsSchema = z
|
|
|
3550
3614
|
: d.model !== undefined
|
|
3551
3615
|
? { $case: 'model', model: d.model }
|
|
3552
3616
|
: undefined,
|
|
3617
|
+
sqlCondition: d.sql_condition,
|
|
3553
3618
|
}));
|
|
3554
3619
|
export const unmarshalTriggerStateSchema = z
|
|
3555
3620
|
.object({
|
|
@@ -3557,6 +3622,7 @@ export const unmarshalTriggerStateSchema = z
|
|
|
3557
3622
|
file_arrival: z
|
|
3558
3623
|
.lazy(() => unmarshalFileArrivalTriggerStateSchema)
|
|
3559
3624
|
.optional(),
|
|
3625
|
+
sql_condition: z.lazy(() => unmarshalSqlConditionStateSchema).optional(),
|
|
3560
3626
|
})
|
|
3561
3627
|
.transform(d => ({
|
|
3562
3628
|
triggerType: d.table !== undefined
|
|
@@ -3564,6 +3630,7 @@ export const unmarshalTriggerStateSchema = z
|
|
|
3564
3630
|
: d.file_arrival !== undefined
|
|
3565
3631
|
? { $case: 'fileArrival', fileArrival: d.file_arrival }
|
|
3566
3632
|
: undefined,
|
|
3633
|
+
sqlCondition: d.sql_condition,
|
|
3567
3634
|
}));
|
|
3568
3635
|
export const unmarshalUpdateJobResponseSchema = z.object({});
|
|
3569
3636
|
export const unmarshalViewItemSchema = z
|
|
@@ -4040,11 +4107,15 @@ export const marshalCronScheduleSchema = z
|
|
|
4040
4107
|
quartzCronExpression: z.string().optional(),
|
|
4041
4108
|
timezoneId: z.string().optional(),
|
|
4042
4109
|
pauseStatus: z.string().optional(),
|
|
4110
|
+
sqlCondition: z
|
|
4111
|
+
.lazy(() => marshalSqlConditionConfigurationSchema)
|
|
4112
|
+
.optional(),
|
|
4043
4113
|
})
|
|
4044
4114
|
.transform(d => ({
|
|
4045
4115
|
quartz_cron_expression: d.quartzCronExpression,
|
|
4046
4116
|
timezone_id: d.timezoneId,
|
|
4047
4117
|
pause_status: d.pauseStatus,
|
|
4118
|
+
sql_condition: d.sqlCondition,
|
|
4048
4119
|
}));
|
|
4049
4120
|
export const marshalDashboardTaskSchema = z
|
|
4050
4121
|
.object({
|
|
@@ -5138,6 +5209,17 @@ export const marshalSparseCheckoutSchema = z
|
|
|
5138
5209
|
.transform(d => ({
|
|
5139
5210
|
patterns: d.patterns,
|
|
5140
5211
|
}));
|
|
5212
|
+
export const marshalSqlConditionConfigurationSchema = z
|
|
5213
|
+
.object({
|
|
5214
|
+
sqlQueryId: z.string().optional(),
|
|
5215
|
+
warehouseId: z.string().optional(),
|
|
5216
|
+
triggerMode: z.string().optional(),
|
|
5217
|
+
})
|
|
5218
|
+
.transform(d => ({
|
|
5219
|
+
sql_query_id: d.sqlQueryId,
|
|
5220
|
+
warehouse_id: d.warehouseId,
|
|
5221
|
+
trigger_mode: d.triggerMode,
|
|
5222
|
+
}));
|
|
5141
5223
|
export const marshalSqlTaskSchema = z
|
|
5142
5224
|
.object({
|
|
5143
5225
|
parameters: z.record(z.string(), z.string()).optional(),
|
|
@@ -5572,6 +5654,9 @@ export const marshalTriggerSettingsSchema = z
|
|
|
5572
5654
|
}),
|
|
5573
5655
|
])
|
|
5574
5656
|
.optional(),
|
|
5657
|
+
sqlCondition: z
|
|
5658
|
+
.lazy(() => marshalSqlConditionConfigurationSchema)
|
|
5659
|
+
.optional(),
|
|
5575
5660
|
})
|
|
5576
5661
|
.transform(d => ({
|
|
5577
5662
|
pause_status: d.pauseStatus,
|
|
@@ -5585,6 +5670,7 @@ export const marshalTriggerSettingsSchema = z
|
|
|
5585
5670
|
table_update: d.configuration.tableUpdate,
|
|
5586
5671
|
}),
|
|
5587
5672
|
...(d.configuration?.$case === 'model' && { model: d.configuration.model }),
|
|
5673
|
+
sql_condition: d.sqlCondition,
|
|
5588
5674
|
}));
|
|
5589
5675
|
export const marshalUpdateJobRequestSchema = z
|
|
5590
5676
|
.object({
|