@databricks/sdk-uc-onlinetables 0.0.0-dev → 0.1.0-dev.2
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 +37 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +177 -0
- package/dist/v1/client.js.map +1 -0
- package/dist/v1/index.d.ts +4 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +4 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/model.d.ts +251 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +397 -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 +34 -0
- package/dist/v1/utils.d.ts.map +1 -0
- package/dist/v1/utils.js +131 -0
- package/dist/v1/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v1/client.ts +232 -0
- package/src/v1/index.ts +22 -0
- package/src/v1/model.ts +620 -0
- package/src/v1/transport.ts +73 -0
- package/src/v1/utils.ts +180 -0
- package/README.md +0 -1
- package/index.js +0 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** The state of an online table. */
|
|
4
|
+
export declare enum OnlineTableState {
|
|
5
|
+
/** The default state. It should not be reported by any online tables. */
|
|
6
|
+
ONLINE_TABLE_STATE_UNSPECIFIED = "ONLINE_TABLE_STATE_UNSPECIFIED",
|
|
7
|
+
/**
|
|
8
|
+
* The online table has just been created and resources are being provisioned. This is also the
|
|
9
|
+
* catch-all state if there is not a more suitable state to report for the online table.
|
|
10
|
+
*/
|
|
11
|
+
PROVISIONING = "PROVISIONING",
|
|
12
|
+
/** The online table is provisioning resources for the data synchronization pipeline. */
|
|
13
|
+
PROVISIONING_PIPELINE_RESOURCES = "PROVISIONING_PIPELINE_RESOURCES",
|
|
14
|
+
/** The online table is executing the initial data synchronization. */
|
|
15
|
+
PROVISIONING_INITIAL_SNAPSHOT = "PROVISIONING_INITIAL_SNAPSHOT",
|
|
16
|
+
/** The online table is ready to serve data. */
|
|
17
|
+
ONLINE = "ONLINE",
|
|
18
|
+
/**
|
|
19
|
+
* The online table is ready to serve data and is continuously updating. Only shown for online
|
|
20
|
+
* tables using the "Continuous" sync mode.
|
|
21
|
+
*/
|
|
22
|
+
ONLINE_CONTINUOUS_UPDATE = "ONLINE_CONTINUOUS_UPDATE",
|
|
23
|
+
/**
|
|
24
|
+
* The online table is ready to serve data and an active update is in progress. Only shown for
|
|
25
|
+
* online tables using the "Triggered" sync mode.
|
|
26
|
+
*/
|
|
27
|
+
ONLINE_TRIGGERED_UPDATE = "ONLINE_TRIGGERED_UPDATE",
|
|
28
|
+
/**
|
|
29
|
+
* The online table is ready to serve data and there are no active updates. Only shown for online
|
|
30
|
+
* tables using the "Triggered" sync mode.
|
|
31
|
+
*/
|
|
32
|
+
ONLINE_NO_PENDING_UPDATE = "ONLINE_NO_PENDING_UPDATE",
|
|
33
|
+
/** The online table has encountered an internal error and is not available for serving. */
|
|
34
|
+
OFFLINE = "OFFLINE",
|
|
35
|
+
/**
|
|
36
|
+
* The online table is not available for serving because the data synchronization pipeline has
|
|
37
|
+
* failed. Please review the pipeline event logs to troubleshoot.
|
|
38
|
+
*/
|
|
39
|
+
OFFLINE_FAILED = "OFFLINE_FAILED",
|
|
40
|
+
/**
|
|
41
|
+
* The data synchronization pipeline has encountered an error but the online table is still
|
|
42
|
+
* available for serving (potentially stale) data. Please review the pipeline event logs to
|
|
43
|
+
* troubleshoot.
|
|
44
|
+
*/
|
|
45
|
+
ONLINE_PIPELINE_FAILED = "ONLINE_PIPELINE_FAILED",
|
|
46
|
+
/**
|
|
47
|
+
* The online table is available for serving, and is provisioning resources for a newly started
|
|
48
|
+
* data synchronization pipeline.
|
|
49
|
+
*/
|
|
50
|
+
ONLINE_UPDATING_PIPELINE_RESOURCES = "ONLINE_UPDATING_PIPELINE_RESOURCES"
|
|
51
|
+
}
|
|
52
|
+
export declare enum ProvisioningInfo_State {
|
|
53
|
+
STATE_UNSPECIFIED = "STATE_UNSPECIFIED",
|
|
54
|
+
PROVISIONING = "PROVISIONING",
|
|
55
|
+
ACTIVE = "ACTIVE",
|
|
56
|
+
FAILED = "FAILED",
|
|
57
|
+
DELETING = "DELETING",
|
|
58
|
+
UPDATING = "UPDATING",
|
|
59
|
+
DEGRADED = "DEGRADED"
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Detailed status of an online table. Shown if the online table is in the ONLINE_CONTINUOUS_UPDATE
|
|
63
|
+
* or the ONLINE_UPDATING_PIPELINE_RESOURCES state.
|
|
64
|
+
*/
|
|
65
|
+
export interface ContinuousUpdateStatus {
|
|
66
|
+
/**
|
|
67
|
+
* The last source table Delta version that was synced to the online table. Note that this Delta
|
|
68
|
+
* version may not be completely synced to the online table yet.
|
|
69
|
+
*/
|
|
70
|
+
lastProcessedCommitVersion?: bigint | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The timestamp of the last time any data was synchronized from the source table to the online
|
|
73
|
+
* table.
|
|
74
|
+
*/
|
|
75
|
+
timestamp?: Temporal.Instant | undefined;
|
|
76
|
+
/** Progress of the initial data synchronization. */
|
|
77
|
+
initialPipelineSyncProgress?: PipelineProgress | undefined;
|
|
78
|
+
}
|
|
79
|
+
/** Create an online table */
|
|
80
|
+
export interface CreateOnlineTableRequest {
|
|
81
|
+
/** Specification of the online table to be created. */
|
|
82
|
+
table?: OnlineTable | undefined;
|
|
83
|
+
}
|
|
84
|
+
/** Delete an online table. */
|
|
85
|
+
export interface DeleteOnlineTableRequest {
|
|
86
|
+
/** Full three-part (catalog, schema, table) name of the table. */
|
|
87
|
+
name?: string | undefined;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Detailed status of an online table. Shown if the online table is in the OFFLINE_FAILED or the
|
|
91
|
+
* ONLINE_PIPELINE_FAILED state.
|
|
92
|
+
*/
|
|
93
|
+
export interface FailedStatus {
|
|
94
|
+
/**
|
|
95
|
+
* The last source table Delta version that was synced to the online table. Note that this Delta
|
|
96
|
+
* version may only be partially synced to the online table. Only populated if the table is still
|
|
97
|
+
* online and available for serving.
|
|
98
|
+
*/
|
|
99
|
+
lastProcessedCommitVersion?: bigint | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* The timestamp of the last time any data was synchronized from the source table to the online
|
|
102
|
+
* table. Only populated if the table is still online and available for serving.
|
|
103
|
+
*/
|
|
104
|
+
timestamp?: Temporal.Instant | undefined;
|
|
105
|
+
}
|
|
106
|
+
/** Get information about an online table. */
|
|
107
|
+
export interface GetOnlineTableRequest {
|
|
108
|
+
/** Full three-part (catalog, schema, table) name of the table. */
|
|
109
|
+
name?: string | undefined;
|
|
110
|
+
}
|
|
111
|
+
/** Online Table information. */
|
|
112
|
+
export interface OnlineTable {
|
|
113
|
+
/** Full three-part (catalog, schema, table) name of the table. */
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
/** Specification of the online table. */
|
|
116
|
+
spec?: OnlineTableSpec | undefined;
|
|
117
|
+
/** Online Table data synchronization status */
|
|
118
|
+
status?: OnlineTableStatus | undefined;
|
|
119
|
+
/** Data serving REST API URL for this table */
|
|
120
|
+
tableServingUrl?: string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* The provisioning state of the online table entity in Unity Catalog. This is distinct from the
|
|
123
|
+
* state of the data synchronization pipeline (i.e. the table may be in "ACTIVE" but the pipeline
|
|
124
|
+
* may be in "PROVISIONING" as it runs asynchronously).
|
|
125
|
+
*/
|
|
126
|
+
unityCatalogProvisioningState?: ProvisioningInfo_State | undefined;
|
|
127
|
+
}
|
|
128
|
+
/** Specification of an online table. */
|
|
129
|
+
export interface OnlineTableSpec {
|
|
130
|
+
/** Exactly one type of scheduling policy should be applied. */
|
|
131
|
+
schedulingPolicy?: {
|
|
132
|
+
$case: 'runContinuously';
|
|
133
|
+
/** Pipeline runs continuously after generating the initial data. */
|
|
134
|
+
runContinuously: OnlineTableSpec_ContinuousSchedulingPolicy;
|
|
135
|
+
} | {
|
|
136
|
+
$case: 'runTriggered';
|
|
137
|
+
/** Pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers) */
|
|
138
|
+
runTriggered: OnlineTableSpec_TriggeredSchedulingPolicy;
|
|
139
|
+
} | undefined;
|
|
140
|
+
/** Three-part (catalog, schema, table) name of the source Delta table. */
|
|
141
|
+
sourceTableFullName?: string | undefined;
|
|
142
|
+
/** Primary Key columns to be used for data insert/update in the destination. */
|
|
143
|
+
primaryKeyColumns?: string[] | undefined;
|
|
144
|
+
/** Time series key to deduplicate (tie-break) rows with the same primary key. */
|
|
145
|
+
timeseriesKey?: string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of
|
|
148
|
+
* the source table upon initialization and does not process any change data feeds (CDFs)
|
|
149
|
+
* afterwards. The pipeline can still be manually triggered afterwards, but it always perform a
|
|
150
|
+
* full copy of the source table and there are no incremental updates. This mode is useful for
|
|
151
|
+
* syncing views or tables without CDFs to online tables.
|
|
152
|
+
* Note that the full-copy pipeline only supports "triggered" scheduling policy.
|
|
153
|
+
*/
|
|
154
|
+
performFullCopy?: boolean | undefined;
|
|
155
|
+
/** ID of the associated pipeline. Generated by the server - cannot be set by the caller. */
|
|
156
|
+
pipelineId?: string | undefined;
|
|
157
|
+
}
|
|
158
|
+
export interface OnlineTableSpec_ContinuousSchedulingPolicy {
|
|
159
|
+
}
|
|
160
|
+
export interface OnlineTableSpec_TriggeredSchedulingPolicy {
|
|
161
|
+
}
|
|
162
|
+
/** Status of an online table. */
|
|
163
|
+
export interface OnlineTableStatus {
|
|
164
|
+
/** The state of the online table. */
|
|
165
|
+
detailedState?: OnlineTableState | undefined;
|
|
166
|
+
/** A text description of the current state of the online table. */
|
|
167
|
+
message?: string | undefined;
|
|
168
|
+
/** The detailed status based on the online table state. */
|
|
169
|
+
detailedStatus?: {
|
|
170
|
+
$case: 'provisioningStatus';
|
|
171
|
+
provisioningStatus: ProvisioningStatus;
|
|
172
|
+
} | {
|
|
173
|
+
$case: 'continuousUpdateStatus';
|
|
174
|
+
continuousUpdateStatus: ContinuousUpdateStatus;
|
|
175
|
+
} | {
|
|
176
|
+
$case: 'triggeredUpdateStatus';
|
|
177
|
+
triggeredUpdateStatus: TriggeredUpdateStatus;
|
|
178
|
+
} | {
|
|
179
|
+
$case: 'failedStatus';
|
|
180
|
+
failedStatus: FailedStatus;
|
|
181
|
+
} | undefined;
|
|
182
|
+
}
|
|
183
|
+
/** Progress information of the Online Table data synchronization pipeline. */
|
|
184
|
+
export interface PipelineProgress {
|
|
185
|
+
/**
|
|
186
|
+
* The source table Delta version that was last processed by the pipeline. The pipeline may not
|
|
187
|
+
* have completely processed this version yet.
|
|
188
|
+
*/
|
|
189
|
+
latestVersionCurrentlyProcessing?: bigint | undefined;
|
|
190
|
+
/** The number of rows that have been synced in this update. */
|
|
191
|
+
syncedRowCount?: bigint | undefined;
|
|
192
|
+
/** The total number of rows that need to be synced in this update. This number may be an estimate. */
|
|
193
|
+
totalRowCount?: bigint | undefined;
|
|
194
|
+
/** The completion ratio of this update. This is a number between 0 and 1. */
|
|
195
|
+
syncProgressCompletion?: number | undefined;
|
|
196
|
+
/** The estimated time remaining to complete this update in seconds. */
|
|
197
|
+
estimatedCompletionTimeSeconds?: number | undefined;
|
|
198
|
+
}
|
|
199
|
+
/** Status of an asynchronously provisioned resource. */
|
|
200
|
+
export interface ProvisioningInfo {
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Detailed status of an online table. Shown if the online table is in the
|
|
204
|
+
* PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state.
|
|
205
|
+
*/
|
|
206
|
+
export interface ProvisioningStatus {
|
|
207
|
+
/**
|
|
208
|
+
* Details about initial data synchronization. Only populated when in the
|
|
209
|
+
* PROVISIONING_INITIAL_SNAPSHOT state.
|
|
210
|
+
*/
|
|
211
|
+
initialPipelineSyncProgress?: PipelineProgress | undefined;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Detailed status of an online table. Shown if the online table is in the ONLINE_TRIGGERED_UPDATE
|
|
215
|
+
* or the ONLINE_NO_PENDING_UPDATE state.
|
|
216
|
+
*/
|
|
217
|
+
export interface TriggeredUpdateStatus {
|
|
218
|
+
/**
|
|
219
|
+
* The last source table Delta version that was synced to the online table. Note that this Delta
|
|
220
|
+
* version may not be completely synced to the online table yet.
|
|
221
|
+
*/
|
|
222
|
+
lastProcessedCommitVersion?: bigint | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The timestamp of the last time any data was synchronized from the source table to the online
|
|
225
|
+
* table.
|
|
226
|
+
*/
|
|
227
|
+
timestamp?: Temporal.Instant | undefined;
|
|
228
|
+
/** Progress of the active data synchronization pipeline. */
|
|
229
|
+
triggeredUpdateProgress?: PipelineProgress | undefined;
|
|
230
|
+
}
|
|
231
|
+
export declare const unmarshalContinuousUpdateStatusSchema: z.ZodType<ContinuousUpdateStatus>;
|
|
232
|
+
export declare const unmarshalFailedStatusSchema: z.ZodType<FailedStatus>;
|
|
233
|
+
export declare const unmarshalOnlineTableSchema: z.ZodType<OnlineTable>;
|
|
234
|
+
export declare const unmarshalOnlineTableSpecSchema: z.ZodType<OnlineTableSpec>;
|
|
235
|
+
export declare const unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema: z.ZodType<OnlineTableSpec_ContinuousSchedulingPolicy>;
|
|
236
|
+
export declare const unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema: z.ZodType<OnlineTableSpec_TriggeredSchedulingPolicy>;
|
|
237
|
+
export declare const unmarshalOnlineTableStatusSchema: z.ZodType<OnlineTableStatus>;
|
|
238
|
+
export declare const unmarshalPipelineProgressSchema: z.ZodType<PipelineProgress>;
|
|
239
|
+
export declare const unmarshalProvisioningStatusSchema: z.ZodType<ProvisioningStatus>;
|
|
240
|
+
export declare const unmarshalTriggeredUpdateStatusSchema: z.ZodType<TriggeredUpdateStatus>;
|
|
241
|
+
export declare const marshalContinuousUpdateStatusSchema: z.ZodType;
|
|
242
|
+
export declare const marshalFailedStatusSchema: z.ZodType;
|
|
243
|
+
export declare const marshalOnlineTableSchema: z.ZodType;
|
|
244
|
+
export declare const marshalOnlineTableSpecSchema: z.ZodType;
|
|
245
|
+
export declare const marshalOnlineTableSpec_ContinuousSchedulingPolicySchema: z.ZodType;
|
|
246
|
+
export declare const marshalOnlineTableSpec_TriggeredSchedulingPolicySchema: z.ZodType;
|
|
247
|
+
export declare const marshalOnlineTableStatusSchema: z.ZodType;
|
|
248
|
+
export declare const marshalPipelineProgressSchema: z.ZodType;
|
|
249
|
+
export declare const marshalProvisioningStatusSchema: z.ZodType;
|
|
250
|
+
export declare const marshalTriggeredUpdateStatusSchema: z.ZodType;
|
|
251
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,oCAAoC;AACpC,oBAAY,gBAAgB;IAC1B,yEAAyE;IACzE,8BAA8B,mCAAmC;IACjE;;;OAGG;IACH,YAAY,iBAAiB;IAC7B,wFAAwF;IACxF,+BAA+B,oCAAoC;IACnE,sEAAsE;IACtE,6BAA6B,kCAAkC;IAC/D,+CAA+C;IAC/C,MAAM,WAAW;IACjB;;;OAGG;IACH,wBAAwB,6BAA6B;IACrD;;;OAGG;IACH,uBAAuB,4BAA4B;IACnD;;;OAGG;IACH,wBAAwB,6BAA6B;IACrD,2FAA2F;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AO,CAAC,eAAe,CA6BjE,CAAC;AAGN,eAAO,MAAM,yDAAyD,EAAE,CAAC,CAAC,OAAO,CAAC,0CAA0C,CAC9G,CAAC;AAGf,eAAO,MAAM,wDAAwD,EAAE,CAAC,CAAC,OAAO,CAAC,yCAAyC,CAC5G,CAAC;AAEf,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAqCrE,CAAC;AAEN,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAuBnE,CAAC;AAEN,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CASrE,CAAC;AAER,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAmB3E,CAAC;AAER,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAe/C,CAAC;AAEN,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAWrC,CAAC;AAEN,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAcpC,CAAC;AAEN,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAoCxC,CAAC;AAGN,eAAO,MAAM,uDAAuD,EAAE,CAAC,CAAC,OAC1D,CAAC;AAGf,eAAO,MAAM,sDAAsD,EAAE,CAAC,CAAC,OACzD,CAAC;AAEf,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OA4C1C,CAAC;AAEN,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAczC,CAAC;AAEN,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAQ3C,CAAC;AAEN,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAe9C,CAAC"}
|
package/dist/v1/model.js
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/** The state of an online table. */
|
|
5
|
+
export var OnlineTableState;
|
|
6
|
+
(function (OnlineTableState) {
|
|
7
|
+
/** The default state. It should not be reported by any online tables. */
|
|
8
|
+
OnlineTableState["ONLINE_TABLE_STATE_UNSPECIFIED"] = "ONLINE_TABLE_STATE_UNSPECIFIED";
|
|
9
|
+
/**
|
|
10
|
+
* The online table has just been created and resources are being provisioned. This is also the
|
|
11
|
+
* catch-all state if there is not a more suitable state to report for the online table.
|
|
12
|
+
*/
|
|
13
|
+
OnlineTableState["PROVISIONING"] = "PROVISIONING";
|
|
14
|
+
/** The online table is provisioning resources for the data synchronization pipeline. */
|
|
15
|
+
OnlineTableState["PROVISIONING_PIPELINE_RESOURCES"] = "PROVISIONING_PIPELINE_RESOURCES";
|
|
16
|
+
/** The online table is executing the initial data synchronization. */
|
|
17
|
+
OnlineTableState["PROVISIONING_INITIAL_SNAPSHOT"] = "PROVISIONING_INITIAL_SNAPSHOT";
|
|
18
|
+
/** The online table is ready to serve data. */
|
|
19
|
+
OnlineTableState["ONLINE"] = "ONLINE";
|
|
20
|
+
/**
|
|
21
|
+
* The online table is ready to serve data and is continuously updating. Only shown for online
|
|
22
|
+
* tables using the "Continuous" sync mode.
|
|
23
|
+
*/
|
|
24
|
+
OnlineTableState["ONLINE_CONTINUOUS_UPDATE"] = "ONLINE_CONTINUOUS_UPDATE";
|
|
25
|
+
/**
|
|
26
|
+
* The online table is ready to serve data and an active update is in progress. Only shown for
|
|
27
|
+
* online tables using the "Triggered" sync mode.
|
|
28
|
+
*/
|
|
29
|
+
OnlineTableState["ONLINE_TRIGGERED_UPDATE"] = "ONLINE_TRIGGERED_UPDATE";
|
|
30
|
+
/**
|
|
31
|
+
* The online table is ready to serve data and there are no active updates. Only shown for online
|
|
32
|
+
* tables using the "Triggered" sync mode.
|
|
33
|
+
*/
|
|
34
|
+
OnlineTableState["ONLINE_NO_PENDING_UPDATE"] = "ONLINE_NO_PENDING_UPDATE";
|
|
35
|
+
/** The online table has encountered an internal error and is not available for serving. */
|
|
36
|
+
OnlineTableState["OFFLINE"] = "OFFLINE";
|
|
37
|
+
/**
|
|
38
|
+
* The online table is not available for serving because the data synchronization pipeline has
|
|
39
|
+
* failed. Please review the pipeline event logs to troubleshoot.
|
|
40
|
+
*/
|
|
41
|
+
OnlineTableState["OFFLINE_FAILED"] = "OFFLINE_FAILED";
|
|
42
|
+
/**
|
|
43
|
+
* The data synchronization pipeline has encountered an error but the online table is still
|
|
44
|
+
* available for serving (potentially stale) data. Please review the pipeline event logs to
|
|
45
|
+
* troubleshoot.
|
|
46
|
+
*/
|
|
47
|
+
OnlineTableState["ONLINE_PIPELINE_FAILED"] = "ONLINE_PIPELINE_FAILED";
|
|
48
|
+
/**
|
|
49
|
+
* The online table is available for serving, and is provisioning resources for a newly started
|
|
50
|
+
* data synchronization pipeline.
|
|
51
|
+
*/
|
|
52
|
+
OnlineTableState["ONLINE_UPDATING_PIPELINE_RESOURCES"] = "ONLINE_UPDATING_PIPELINE_RESOURCES";
|
|
53
|
+
})(OnlineTableState || (OnlineTableState = {}));
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
55
|
+
export var ProvisioningInfo_State;
|
|
56
|
+
(function (ProvisioningInfo_State) {
|
|
57
|
+
ProvisioningInfo_State["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
58
|
+
ProvisioningInfo_State["PROVISIONING"] = "PROVISIONING";
|
|
59
|
+
ProvisioningInfo_State["ACTIVE"] = "ACTIVE";
|
|
60
|
+
ProvisioningInfo_State["FAILED"] = "FAILED";
|
|
61
|
+
ProvisioningInfo_State["DELETING"] = "DELETING";
|
|
62
|
+
ProvisioningInfo_State["UPDATING"] = "UPDATING";
|
|
63
|
+
ProvisioningInfo_State["DEGRADED"] = "DEGRADED";
|
|
64
|
+
})(ProvisioningInfo_State || (ProvisioningInfo_State = {}));
|
|
65
|
+
export const unmarshalContinuousUpdateStatusSchema = z
|
|
66
|
+
.object({
|
|
67
|
+
last_processed_commit_version: z
|
|
68
|
+
.union([z.number(), z.bigint()])
|
|
69
|
+
.transform(v => BigInt(v))
|
|
70
|
+
.optional(),
|
|
71
|
+
timestamp: z
|
|
72
|
+
.string()
|
|
73
|
+
.transform(s => Temporal.Instant.from(s))
|
|
74
|
+
.optional(),
|
|
75
|
+
initial_pipeline_sync_progress: z
|
|
76
|
+
.lazy(() => unmarshalPipelineProgressSchema)
|
|
77
|
+
.optional(),
|
|
78
|
+
})
|
|
79
|
+
.transform(d => ({
|
|
80
|
+
lastProcessedCommitVersion: d.last_processed_commit_version,
|
|
81
|
+
timestamp: d.timestamp,
|
|
82
|
+
initialPipelineSyncProgress: d.initial_pipeline_sync_progress,
|
|
83
|
+
}));
|
|
84
|
+
export const unmarshalFailedStatusSchema = z
|
|
85
|
+
.object({
|
|
86
|
+
last_processed_commit_version: z
|
|
87
|
+
.union([z.number(), z.bigint()])
|
|
88
|
+
.transform(v => BigInt(v))
|
|
89
|
+
.optional(),
|
|
90
|
+
timestamp: z
|
|
91
|
+
.string()
|
|
92
|
+
.transform(s => Temporal.Instant.from(s))
|
|
93
|
+
.optional(),
|
|
94
|
+
})
|
|
95
|
+
.transform(d => ({
|
|
96
|
+
lastProcessedCommitVersion: d.last_processed_commit_version,
|
|
97
|
+
timestamp: d.timestamp,
|
|
98
|
+
}));
|
|
99
|
+
export const unmarshalOnlineTableSchema = z
|
|
100
|
+
.object({
|
|
101
|
+
name: z.string().optional(),
|
|
102
|
+
spec: z.lazy(() => unmarshalOnlineTableSpecSchema).optional(),
|
|
103
|
+
status: z.lazy(() => unmarshalOnlineTableStatusSchema).optional(),
|
|
104
|
+
table_serving_url: z.string().optional(),
|
|
105
|
+
unity_catalog_provisioning_state: z.enum(ProvisioningInfo_State).optional(),
|
|
106
|
+
})
|
|
107
|
+
.transform(d => ({
|
|
108
|
+
name: d.name,
|
|
109
|
+
spec: d.spec,
|
|
110
|
+
status: d.status,
|
|
111
|
+
tableServingUrl: d.table_serving_url,
|
|
112
|
+
unityCatalogProvisioningState: d.unity_catalog_provisioning_state,
|
|
113
|
+
}));
|
|
114
|
+
export const unmarshalOnlineTableSpecSchema = z
|
|
115
|
+
.object({
|
|
116
|
+
run_continuously: z
|
|
117
|
+
.lazy(() => unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema)
|
|
118
|
+
.optional(),
|
|
119
|
+
run_triggered: z
|
|
120
|
+
.lazy(() => unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema)
|
|
121
|
+
.optional(),
|
|
122
|
+
source_table_full_name: z.string().optional(),
|
|
123
|
+
primary_key_columns: z.array(z.string()).optional(),
|
|
124
|
+
timeseries_key: z.string().optional(),
|
|
125
|
+
perform_full_copy: z.boolean().optional(),
|
|
126
|
+
pipeline_id: z.string().optional(),
|
|
127
|
+
})
|
|
128
|
+
.transform(d => ({
|
|
129
|
+
schedulingPolicy: d.run_continuously !== undefined
|
|
130
|
+
? {
|
|
131
|
+
$case: 'runContinuously',
|
|
132
|
+
runContinuously: d.run_continuously,
|
|
133
|
+
}
|
|
134
|
+
: d.run_triggered !== undefined
|
|
135
|
+
? { $case: 'runTriggered', runTriggered: d.run_triggered }
|
|
136
|
+
: undefined,
|
|
137
|
+
sourceTableFullName: d.source_table_full_name,
|
|
138
|
+
primaryKeyColumns: d.primary_key_columns,
|
|
139
|
+
timeseriesKey: d.timeseries_key,
|
|
140
|
+
performFullCopy: d.perform_full_copy,
|
|
141
|
+
pipelineId: d.pipeline_id,
|
|
142
|
+
}));
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
144
|
+
export const unmarshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
146
|
+
export const unmarshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
|
|
147
|
+
export const unmarshalOnlineTableStatusSchema = z
|
|
148
|
+
.object({
|
|
149
|
+
detailed_state: z.enum(OnlineTableState).optional(),
|
|
150
|
+
message: z.string().optional(),
|
|
151
|
+
provisioning_status: z
|
|
152
|
+
.lazy(() => unmarshalProvisioningStatusSchema)
|
|
153
|
+
.optional(),
|
|
154
|
+
continuous_update_status: z
|
|
155
|
+
.lazy(() => unmarshalContinuousUpdateStatusSchema)
|
|
156
|
+
.optional(),
|
|
157
|
+
triggered_update_status: z
|
|
158
|
+
.lazy(() => unmarshalTriggeredUpdateStatusSchema)
|
|
159
|
+
.optional(),
|
|
160
|
+
failed_status: z.lazy(() => unmarshalFailedStatusSchema).optional(),
|
|
161
|
+
})
|
|
162
|
+
.transform(d => ({
|
|
163
|
+
detailedState: d.detailed_state,
|
|
164
|
+
message: d.message,
|
|
165
|
+
detailedStatus: d.provisioning_status !== undefined
|
|
166
|
+
? {
|
|
167
|
+
$case: 'provisioningStatus',
|
|
168
|
+
provisioningStatus: d.provisioning_status,
|
|
169
|
+
}
|
|
170
|
+
: d.continuous_update_status !== undefined
|
|
171
|
+
? {
|
|
172
|
+
$case: 'continuousUpdateStatus',
|
|
173
|
+
continuousUpdateStatus: d.continuous_update_status,
|
|
174
|
+
}
|
|
175
|
+
: d.triggered_update_status !== undefined
|
|
176
|
+
? {
|
|
177
|
+
$case: 'triggeredUpdateStatus',
|
|
178
|
+
triggeredUpdateStatus: d.triggered_update_status,
|
|
179
|
+
}
|
|
180
|
+
: d.failed_status !== undefined
|
|
181
|
+
? { $case: 'failedStatus', failedStatus: d.failed_status }
|
|
182
|
+
: undefined,
|
|
183
|
+
}));
|
|
184
|
+
export const unmarshalPipelineProgressSchema = z
|
|
185
|
+
.object({
|
|
186
|
+
latest_version_currently_processing: z
|
|
187
|
+
.union([z.number(), z.bigint()])
|
|
188
|
+
.transform(v => BigInt(v))
|
|
189
|
+
.optional(),
|
|
190
|
+
synced_row_count: z
|
|
191
|
+
.union([z.number(), z.bigint()])
|
|
192
|
+
.transform(v => BigInt(v))
|
|
193
|
+
.optional(),
|
|
194
|
+
total_row_count: z
|
|
195
|
+
.union([z.number(), z.bigint()])
|
|
196
|
+
.transform(v => BigInt(v))
|
|
197
|
+
.optional(),
|
|
198
|
+
sync_progress_completion: z.number().optional(),
|
|
199
|
+
estimated_completion_time_seconds: z.number().optional(),
|
|
200
|
+
})
|
|
201
|
+
.transform(d => ({
|
|
202
|
+
latestVersionCurrentlyProcessing: d.latest_version_currently_processing,
|
|
203
|
+
syncedRowCount: d.synced_row_count,
|
|
204
|
+
totalRowCount: d.total_row_count,
|
|
205
|
+
syncProgressCompletion: d.sync_progress_completion,
|
|
206
|
+
estimatedCompletionTimeSeconds: d.estimated_completion_time_seconds,
|
|
207
|
+
}));
|
|
208
|
+
export const unmarshalProvisioningStatusSchema = z
|
|
209
|
+
.object({
|
|
210
|
+
initial_pipeline_sync_progress: z
|
|
211
|
+
.lazy(() => unmarshalPipelineProgressSchema)
|
|
212
|
+
.optional(),
|
|
213
|
+
})
|
|
214
|
+
.transform(d => ({
|
|
215
|
+
initialPipelineSyncProgress: d.initial_pipeline_sync_progress,
|
|
216
|
+
}));
|
|
217
|
+
export const unmarshalTriggeredUpdateStatusSchema = z
|
|
218
|
+
.object({
|
|
219
|
+
last_processed_commit_version: z
|
|
220
|
+
.union([z.number(), z.bigint()])
|
|
221
|
+
.transform(v => BigInt(v))
|
|
222
|
+
.optional(),
|
|
223
|
+
timestamp: z
|
|
224
|
+
.string()
|
|
225
|
+
.transform(s => Temporal.Instant.from(s))
|
|
226
|
+
.optional(),
|
|
227
|
+
triggered_update_progress: z
|
|
228
|
+
.lazy(() => unmarshalPipelineProgressSchema)
|
|
229
|
+
.optional(),
|
|
230
|
+
})
|
|
231
|
+
.transform(d => ({
|
|
232
|
+
lastProcessedCommitVersion: d.last_processed_commit_version,
|
|
233
|
+
timestamp: d.timestamp,
|
|
234
|
+
triggeredUpdateProgress: d.triggered_update_progress,
|
|
235
|
+
}));
|
|
236
|
+
export const marshalContinuousUpdateStatusSchema = z
|
|
237
|
+
.object({
|
|
238
|
+
lastProcessedCommitVersion: z.bigint().optional(),
|
|
239
|
+
timestamp: z
|
|
240
|
+
.any()
|
|
241
|
+
.transform((d) => d.toString())
|
|
242
|
+
.optional(),
|
|
243
|
+
initialPipelineSyncProgress: z
|
|
244
|
+
.lazy(() => marshalPipelineProgressSchema)
|
|
245
|
+
.optional(),
|
|
246
|
+
})
|
|
247
|
+
.transform(d => ({
|
|
248
|
+
last_processed_commit_version: d.lastProcessedCommitVersion,
|
|
249
|
+
timestamp: d.timestamp,
|
|
250
|
+
initial_pipeline_sync_progress: d.initialPipelineSyncProgress,
|
|
251
|
+
}));
|
|
252
|
+
export const marshalFailedStatusSchema = z
|
|
253
|
+
.object({
|
|
254
|
+
lastProcessedCommitVersion: z.bigint().optional(),
|
|
255
|
+
timestamp: z
|
|
256
|
+
.any()
|
|
257
|
+
.transform((d) => d.toString())
|
|
258
|
+
.optional(),
|
|
259
|
+
})
|
|
260
|
+
.transform(d => ({
|
|
261
|
+
last_processed_commit_version: d.lastProcessedCommitVersion,
|
|
262
|
+
timestamp: d.timestamp,
|
|
263
|
+
}));
|
|
264
|
+
export const marshalOnlineTableSchema = z
|
|
265
|
+
.object({
|
|
266
|
+
name: z.string().optional(),
|
|
267
|
+
spec: z.lazy(() => marshalOnlineTableSpecSchema).optional(),
|
|
268
|
+
status: z.lazy(() => marshalOnlineTableStatusSchema).optional(),
|
|
269
|
+
tableServingUrl: z.string().optional(),
|
|
270
|
+
unityCatalogProvisioningState: z.enum(ProvisioningInfo_State).optional(),
|
|
271
|
+
})
|
|
272
|
+
.transform(d => ({
|
|
273
|
+
name: d.name,
|
|
274
|
+
spec: d.spec,
|
|
275
|
+
status: d.status,
|
|
276
|
+
table_serving_url: d.tableServingUrl,
|
|
277
|
+
unity_catalog_provisioning_state: d.unityCatalogProvisioningState,
|
|
278
|
+
}));
|
|
279
|
+
export const marshalOnlineTableSpecSchema = z
|
|
280
|
+
.object({
|
|
281
|
+
schedulingPolicy: z
|
|
282
|
+
.discriminatedUnion('$case', [
|
|
283
|
+
z.object({
|
|
284
|
+
$case: z.literal('runContinuously'),
|
|
285
|
+
runContinuously: z.lazy(() => marshalOnlineTableSpec_ContinuousSchedulingPolicySchema),
|
|
286
|
+
}),
|
|
287
|
+
z.object({
|
|
288
|
+
$case: z.literal('runTriggered'),
|
|
289
|
+
runTriggered: z.lazy(() => marshalOnlineTableSpec_TriggeredSchedulingPolicySchema),
|
|
290
|
+
}),
|
|
291
|
+
])
|
|
292
|
+
.optional(),
|
|
293
|
+
sourceTableFullName: z.string().optional(),
|
|
294
|
+
primaryKeyColumns: z.array(z.string()).optional(),
|
|
295
|
+
timeseriesKey: z.string().optional(),
|
|
296
|
+
performFullCopy: z.boolean().optional(),
|
|
297
|
+
pipelineId: z.string().optional(),
|
|
298
|
+
})
|
|
299
|
+
.transform(d => ({
|
|
300
|
+
...(d.schedulingPolicy?.$case === 'runContinuously' && {
|
|
301
|
+
run_continuously: d.schedulingPolicy.runContinuously,
|
|
302
|
+
}),
|
|
303
|
+
...(d.schedulingPolicy?.$case === 'runTriggered' && {
|
|
304
|
+
run_triggered: d.schedulingPolicy.runTriggered,
|
|
305
|
+
}),
|
|
306
|
+
source_table_full_name: d.sourceTableFullName,
|
|
307
|
+
primary_key_columns: d.primaryKeyColumns,
|
|
308
|
+
timeseries_key: d.timeseriesKey,
|
|
309
|
+
perform_full_copy: d.performFullCopy,
|
|
310
|
+
pipeline_id: d.pipelineId,
|
|
311
|
+
}));
|
|
312
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
313
|
+
export const marshalOnlineTableSpec_ContinuousSchedulingPolicySchema = z.object({});
|
|
314
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
315
|
+
export const marshalOnlineTableSpec_TriggeredSchedulingPolicySchema = z.object({});
|
|
316
|
+
export const marshalOnlineTableStatusSchema = z
|
|
317
|
+
.object({
|
|
318
|
+
detailedState: z.enum(OnlineTableState).optional(),
|
|
319
|
+
message: z.string().optional(),
|
|
320
|
+
detailedStatus: z
|
|
321
|
+
.discriminatedUnion('$case', [
|
|
322
|
+
z.object({
|
|
323
|
+
$case: z.literal('provisioningStatus'),
|
|
324
|
+
provisioningStatus: z.lazy(() => marshalProvisioningStatusSchema),
|
|
325
|
+
}),
|
|
326
|
+
z.object({
|
|
327
|
+
$case: z.literal('continuousUpdateStatus'),
|
|
328
|
+
continuousUpdateStatus: z.lazy(() => marshalContinuousUpdateStatusSchema),
|
|
329
|
+
}),
|
|
330
|
+
z.object({
|
|
331
|
+
$case: z.literal('triggeredUpdateStatus'),
|
|
332
|
+
triggeredUpdateStatus: z.lazy(() => marshalTriggeredUpdateStatusSchema),
|
|
333
|
+
}),
|
|
334
|
+
z.object({
|
|
335
|
+
$case: z.literal('failedStatus'),
|
|
336
|
+
failedStatus: z.lazy(() => marshalFailedStatusSchema),
|
|
337
|
+
}),
|
|
338
|
+
])
|
|
339
|
+
.optional(),
|
|
340
|
+
})
|
|
341
|
+
.transform(d => ({
|
|
342
|
+
detailed_state: d.detailedState,
|
|
343
|
+
message: d.message,
|
|
344
|
+
...(d.detailedStatus?.$case === 'provisioningStatus' && {
|
|
345
|
+
provisioning_status: d.detailedStatus.provisioningStatus,
|
|
346
|
+
}),
|
|
347
|
+
...(d.detailedStatus?.$case === 'continuousUpdateStatus' && {
|
|
348
|
+
continuous_update_status: d.detailedStatus.continuousUpdateStatus,
|
|
349
|
+
}),
|
|
350
|
+
...(d.detailedStatus?.$case === 'triggeredUpdateStatus' && {
|
|
351
|
+
triggered_update_status: d.detailedStatus.triggeredUpdateStatus,
|
|
352
|
+
}),
|
|
353
|
+
...(d.detailedStatus?.$case === 'failedStatus' && {
|
|
354
|
+
failed_status: d.detailedStatus.failedStatus,
|
|
355
|
+
}),
|
|
356
|
+
}));
|
|
357
|
+
export const marshalPipelineProgressSchema = z
|
|
358
|
+
.object({
|
|
359
|
+
latestVersionCurrentlyProcessing: z.bigint().optional(),
|
|
360
|
+
syncedRowCount: z.bigint().optional(),
|
|
361
|
+
totalRowCount: z.bigint().optional(),
|
|
362
|
+
syncProgressCompletion: z.number().optional(),
|
|
363
|
+
estimatedCompletionTimeSeconds: z.number().optional(),
|
|
364
|
+
})
|
|
365
|
+
.transform(d => ({
|
|
366
|
+
latest_version_currently_processing: d.latestVersionCurrentlyProcessing,
|
|
367
|
+
synced_row_count: d.syncedRowCount,
|
|
368
|
+
total_row_count: d.totalRowCount,
|
|
369
|
+
sync_progress_completion: d.syncProgressCompletion,
|
|
370
|
+
estimated_completion_time_seconds: d.estimatedCompletionTimeSeconds,
|
|
371
|
+
}));
|
|
372
|
+
export const marshalProvisioningStatusSchema = z
|
|
373
|
+
.object({
|
|
374
|
+
initialPipelineSyncProgress: z
|
|
375
|
+
.lazy(() => marshalPipelineProgressSchema)
|
|
376
|
+
.optional(),
|
|
377
|
+
})
|
|
378
|
+
.transform(d => ({
|
|
379
|
+
initial_pipeline_sync_progress: d.initialPipelineSyncProgress,
|
|
380
|
+
}));
|
|
381
|
+
export const marshalTriggeredUpdateStatusSchema = z
|
|
382
|
+
.object({
|
|
383
|
+
lastProcessedCommitVersion: z.bigint().optional(),
|
|
384
|
+
timestamp: z
|
|
385
|
+
.any()
|
|
386
|
+
.transform((d) => d.toString())
|
|
387
|
+
.optional(),
|
|
388
|
+
triggeredUpdateProgress: z
|
|
389
|
+
.lazy(() => marshalPipelineProgressSchema)
|
|
390
|
+
.optional(),
|
|
391
|
+
})
|
|
392
|
+
.transform(d => ({
|
|
393
|
+
last_processed_commit_version: d.lastProcessedCommitVersion,
|
|
394
|
+
timestamp: d.timestamp,
|
|
395
|
+
triggered_update_progress: d.triggeredUpdateProgress,
|
|
396
|
+
}));
|
|
397
|
+
//# sourceMappingURL=model.js.map
|