@databricks/sdk-statementexecution 0.34.0 → 0.35.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/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v1/client.d.ts +95 -91
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +186 -211
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -7
- package/dist/v1/index.js +4 -7
- package/dist/v1/model.d.ts +459 -456
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +230 -299
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +21 -17
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +60 -69
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts +18 -14
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +76 -103
- package/dist/v1/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
package/dist/package.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
package/dist/v1/client.d.ts
CHANGED
|
@@ -1,93 +1,97 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
1
|
+
import { CancelStatementRequest, CancelStatementResponse, ExecuteStatementRequest, GetResultDataRequest, GetStatementResultRequest, ResultData, StatementResponse } from "./model.js";
|
|
2
|
+
import { CallOptions } from "@databricks/sdk-options/call";
|
|
3
|
+
import { ClientOptions } from "@databricks/sdk-options/client";
|
|
4
|
+
|
|
5
|
+
//#region src/v1/client.d.ts
|
|
6
|
+
declare class StatementExecutionClient {
|
|
7
|
+
private readonly options;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly userAgent;
|
|
10
|
+
private config;
|
|
11
|
+
constructor(options: ClientOptions);
|
|
12
|
+
private resolveConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Requests that an executing statement be canceled. Callers must poll for status to see the
|
|
15
|
+
* terminal state. Cancel response is empty; receiving response indicates successful receipt.
|
|
16
|
+
*/
|
|
17
|
+
cancelStatement(req: CancelStatementRequest, options?: CallOptions): Promise<CancelStatementResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Execute a SQL statement and optionally await its results for a specified time.
|
|
20
|
+
*
|
|
21
|
+
* **Use case: small result sets with INLINE + JSON_ARRAY**
|
|
22
|
+
*
|
|
23
|
+
* For flows that generate small and predictable result sets (<= 25 MiB), `INLINE` responses of `JSON_ARRAY` result
|
|
24
|
+
* data are typically the simplest way to execute and fetch result data.
|
|
25
|
+
*
|
|
26
|
+
* **Use case: large result sets with EXTERNAL_LINKS**
|
|
27
|
+
*
|
|
28
|
+
* Using `EXTERNAL_LINKS` to fetch result data allows you to fetch large result sets efficiently.
|
|
29
|
+
* The main differences from using `INLINE` disposition are that the result data is accessed
|
|
30
|
+
* with URLs, and
|
|
31
|
+
* that there are 3 supported formats: `JSON_ARRAY`, `ARROW_STREAM` and `CSV` compared to only `JSON_ARRAY` with
|
|
32
|
+
* `INLINE`.
|
|
33
|
+
*
|
|
34
|
+
* ** URLs**
|
|
35
|
+
*
|
|
36
|
+
* External links point to data stored within your workspace's internal storage, in the form of
|
|
37
|
+
* a URL. The URLs are valid for only a short
|
|
38
|
+
* period, <= 15 minutes. Alongside each `external_link` is an expiration field indicating the time at which the URL
|
|
39
|
+
* is no longer valid. In `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times and in parallel.
|
|
40
|
+
*
|
|
41
|
+
* ----
|
|
42
|
+
*
|
|
43
|
+
* ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
|
|
44
|
+
*
|
|
45
|
+
* When you use the `EXTERNAL_LINKS` disposition, a
|
|
46
|
+
* short-lived, URL is generated, which can be
|
|
47
|
+
* used to download the results directly
|
|
48
|
+
* from . As a
|
|
49
|
+
* short-lived is
|
|
50
|
+
* embedded in this URL, you should protect
|
|
51
|
+
* the URL.
|
|
52
|
+
*
|
|
53
|
+
* Because URLs are already generated with
|
|
54
|
+
* embedded temporary s,
|
|
55
|
+
* you must not set an `Authorization` header in the download requests.
|
|
56
|
+
*
|
|
57
|
+
* The `EXTERNAL_LINKS` disposition can be disabled upon request by creating a support
|
|
58
|
+
* case.
|
|
59
|
+
*
|
|
60
|
+
* See also [Security best practices](/sql/admin/sql-execution-tutorial.html#security-best-practices).
|
|
61
|
+
*
|
|
62
|
+
* ----
|
|
63
|
+
*
|
|
64
|
+
* StatementResponse contains `statement_id` and `status`; other fields might be absent or present depending on
|
|
65
|
+
* context. If the SQL warehouse fails to execute the provided statement, a 200 response is returned with
|
|
66
|
+
* `status.state` set to `FAILED` (in contrast to a failure when accepting the request, which results in a non-200
|
|
67
|
+
* response). Details of the error can be found at `status.error` in case of execution failures.
|
|
68
|
+
*/
|
|
69
|
+
executeStatement(req: ExecuteStatementRequest, options?: CallOptions): Promise<StatementResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* After the statement execution has `SUCCEEDED`, this request can be used to fetch any chunk by
|
|
72
|
+
* index. Whereas the first chunk with `chunk_index=0` is typically fetched with
|
|
73
|
+
* :method:statementexecution/executeStatement or :method:statementexecution/getStatement, this
|
|
74
|
+
* request can be used to fetch subsequent chunks. The response structure is identical to the
|
|
75
|
+
* nested `result` element described in the :method:statementexecution/getStatement request, and
|
|
76
|
+
* similarly includes the `next_chunk_index` and `next_chunk_internal_link` fields for simple
|
|
77
|
+
* iteration through the result set. Depending on `disposition`, the response returns chunks of
|
|
78
|
+
* data either inline, or as links.
|
|
79
|
+
*/
|
|
80
|
+
getResultData(req: GetResultDataRequest, options?: CallOptions): Promise<ResultData>;
|
|
81
|
+
/**
|
|
82
|
+
* This request can be used to poll for the statement's status. StatementResponse contains
|
|
83
|
+
* `statement_id` and `status`; other fields might be absent or present depending on context.
|
|
84
|
+
* When the `status.state` field is `SUCCEEDED` it will also return the result manifest and the
|
|
85
|
+
* first chunk of the result data. When the statement is in the terminal states `CANCELED`,
|
|
86
|
+
* `CLOSED` or `FAILED`, it returns HTTP 200 with the state set. After at least 12 hours in
|
|
87
|
+
* terminal state, the statement is removed from the warehouse and further calls will receive an
|
|
88
|
+
* HTTP 404 response.
|
|
89
|
+
*
|
|
90
|
+
* **NOTE**
|
|
91
|
+
* This call currently might take up to 5 seconds to get the latest status and result.
|
|
92
|
+
*/
|
|
93
|
+
getStatementResult(req: GetStatementResultRequest, options?: CallOptions): Promise<StatementResponse>;
|
|
92
94
|
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { StatementExecutionClient };
|
|
93
97
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/v1/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;cAyCa,wBAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,SAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAUb,aAAA;EAWI;;;;EAFN,eAAA,CACJ,GAAA,EAAK,sBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,uBAAA;EAgFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAHL,gBAAA,CACJ,GAAA,EAAK,uBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,iBAAA;;;;;;;;;;;EAoCL,aAAA,CACJ,GAAA,EAAK,oBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,UAAA;;;;;;;;;;;;;EAqCL,kBAAA,CACJ,GAAA,EAAK,yBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,iBAAA;AAAA"}
|