@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.
@@ -0,0 +1,7 @@
1
+ //#region package.json
2
+ var name = "@databricks/sdk-statementexecution";
3
+ var version = "0.35.0";
4
+
5
+ //#endregion
6
+ export { name, version };
7
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,93 +1,97 @@
1
- import type { CallOptions } from '@databricks/sdk-options/call';
2
- import type { ClientOptions } from '@databricks/sdk-options/client';
3
- import type { CancelStatementRequest, CancelStatementResponse, ExecuteStatementRequest, GetResultDataRequest, GetStatementResultRequest, ResultData, StatementResponse } from './model';
4
- export declare class StatementExecutionClient {
5
- private readonly options;
6
- private readonly logger;
7
- private readonly userAgent;
8
- private config;
9
- constructor(options: ClientOptions);
10
- private resolveConfig;
11
- /**
12
- * Requests that an executing statement be canceled. Callers must poll for status to see the
13
- * terminal state. Cancel response is empty; receiving response indicates successful receipt.
14
- */
15
- cancelStatement(req: CancelStatementRequest, options?: CallOptions): Promise<CancelStatementResponse>;
16
- /**
17
- * Execute a SQL statement and optionally await its results for a specified time.
18
- *
19
- * **Use case: small result sets with INLINE + JSON_ARRAY**
20
- *
21
- * For flows that generate small and predictable result sets (<= 25 MiB), `INLINE` responses of `JSON_ARRAY` result
22
- * data are typically the simplest way to execute and fetch result data.
23
- *
24
- * **Use case: large result sets with EXTERNAL_LINKS**
25
- *
26
- * Using `EXTERNAL_LINKS` to fetch result data allows you to fetch large result sets efficiently.
27
- * The main differences from using `INLINE` disposition are that the result data is accessed
28
- * with URLs, and
29
- * that there are 3 supported formats: `JSON_ARRAY`, `ARROW_STREAM` and `CSV` compared to only `JSON_ARRAY` with
30
- * `INLINE`.
31
- *
32
- * ** URLs**
33
- *
34
- * External links point to data stored within your workspace's internal storage, in the form of
35
- * a URL. The URLs are valid for only a short
36
- * period, <= 15 minutes. Alongside each `external_link` is an expiration field indicating the time at which the URL
37
- * is no longer valid. In `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times and in parallel.
38
- *
39
- * ----
40
- *
41
- * ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
42
- *
43
- * When you use the `EXTERNAL_LINKS` disposition, a
44
- * short-lived, URL is generated, which can be
45
- * used to download the results directly
46
- * from . As a
47
- * short-lived is
48
- * embedded in this URL, you should protect
49
- * the URL.
50
- *
51
- * Because URLs are already generated with
52
- * embedded temporary s,
53
- * you must not set an `Authorization` header in the download requests.
54
- *
55
- * The `EXTERNAL_LINKS` disposition can be disabled upon request by creating a support
56
- * case.
57
- *
58
- * See also [Security best practices](/sql/admin/sql-execution-tutorial.html#security-best-practices).
59
- *
60
- * ----
61
- *
62
- * StatementResponse contains `statement_id` and `status`; other fields might be absent or present depending on
63
- * context. If the SQL warehouse fails to execute the provided statement, a 200 response is returned with
64
- * `status.state` set to `FAILED` (in contrast to a failure when accepting the request, which results in a non-200
65
- * response). Details of the error can be found at `status.error` in case of execution failures.
66
- */
67
- executeStatement(req: ExecuteStatementRequest, options?: CallOptions): Promise<StatementResponse>;
68
- /**
69
- * After the statement execution has `SUCCEEDED`, this request can be used to fetch any chunk by
70
- * index. Whereas the first chunk with `chunk_index=0` is typically fetched with
71
- * :method:statementexecution/executeStatement or :method:statementexecution/getStatement, this
72
- * request can be used to fetch subsequent chunks. The response structure is identical to the
73
- * nested `result` element described in the :method:statementexecution/getStatement request, and
74
- * similarly includes the `next_chunk_index` and `next_chunk_internal_link` fields for simple
75
- * iteration through the result set. Depending on `disposition`, the response returns chunks of
76
- * data either inline, or as links.
77
- */
78
- getResultData(req: GetResultDataRequest, options?: CallOptions): Promise<ResultData>;
79
- /**
80
- * This request can be used to poll for the statement's status. StatementResponse contains
81
- * `statement_id` and `status`; other fields might be absent or present depending on context.
82
- * When the `status.state` field is `SUCCEEDED` it will also return the result manifest and the
83
- * first chunk of the result data. When the statement is in the terminal states `CANCELED`,
84
- * `CLOSED` or `FAILED`, it returns HTTP 200 with the state set. After at least 12 hours in
85
- * terminal state, the statement is removed from the warehouse and further calls will receive an
86
- * HTTP 404 response.
87
- *
88
- * **NOTE**
89
- * This call currently might take up to 5 seconds to get the latest status and result.
90
- */
91
- getStatementResult(req: GetStatementResultRequest, options?: CallOptions): Promise<StatementResponse>;
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
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAWlE,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EACV,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAejB,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAInC,OAAO,CAAC,MAAM,CAA4C;gBAE9C,OAAO,EAAE,aAAa;IAUlC,OAAO,CAAC,aAAa;IAKrB;;;OAGG;IACG,eAAe,CACnB,GAAG,EAAE,sBAAsB,EAC3B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,uBAAuB,CAAC;IA0BnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkDG;IACG,gBAAgB,CACpB,GAAG,EAAE,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