@databricks/sdk-uc-tables 0.34.0 → 0.36.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 +129 -125
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +354 -457
- 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 +772 -785
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +799 -1077
- 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,127 +1,131 @@
|
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
import { CreateTableConstraintRequest, CreateTableRequest, DeleteTableConstraintRequest, DeleteTableConstraintResponse, DeleteTableRequest, DeleteTableResponse, GetTableRequest, ListTableSummariesRequest, ListTableSummariesResponse, ListTablesRequest, ListTablesResponse, TableConstraint, TableExistsRequest, TableExistsResponse, TableInfo, TableSummary, UpdateTableRequest, UpdateTableResponse } 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 TablesClient {
|
|
7
|
+
private readonly options;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly userAgent;
|
|
10
|
+
private config;
|
|
11
|
+
constructor(options: ClientOptions);
|
|
12
|
+
private resolveConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new table in the specified catalog and schema.
|
|
15
|
+
*
|
|
16
|
+
* To create an external delta table, the caller must have the **EXTERNAL_USE_SCHEMA** privilege on the parent schema
|
|
17
|
+
* and the **EXTERNAL_USE_LOCATION** privilege on the external location. These privileges must always be granted explicitly,
|
|
18
|
+
* and cannot be inherited through ownership or **ALL_PRIVILEGES**.
|
|
19
|
+
*
|
|
20
|
+
* Standard UC permissions needed to create tables still apply: **USE_CATALOG** on the parent catalog (or ownership of
|
|
21
|
+
* the parent catalog), **CREATE_TABLE** and **USE_SCHEMA** on the parent schema (or ownership of the parent schema),
|
|
22
|
+
* and **CREATE_EXTERNAL_TABLE** on external location.
|
|
23
|
+
*
|
|
24
|
+
* The **columns** field needs to be in a Spark compatible format, so we recommend you use Spark to create these tables.
|
|
25
|
+
* The API itself does not validate the correctness of the column spec. If the spec is not Spark compatible,
|
|
26
|
+
* the tables may not be readable by Databricks Runtime.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* NOTE: The Create Table API for external clients only supports creating **external delta tables**. The values shown
|
|
35
|
+
* in the respective enums are all values supported by <Databricks>, however for this specific Create Table API,
|
|
36
|
+
* only **table_type** **EXTERNAL** and **data_source_format** **DELTA** are supported. Additionally, column masks
|
|
37
|
+
* are not supported when creating tables through this API.
|
|
38
|
+
*/
|
|
39
|
+
createTable(req: CreateTableRequest, options?: CallOptions): Promise<TableInfo>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new table constraint.
|
|
42
|
+
*
|
|
43
|
+
* For the table constraint creation to succeed, the user must satisfy both of these conditions:
|
|
44
|
+
* - the user must have the **USE_CATALOG** privilege on the table's parent catalog,
|
|
45
|
+
* the **USE_SCHEMA** privilege on the table's parent schema, and be the owner of the table.
|
|
46
|
+
* - if the new constraint is a __ForeignKeyConstraint__,
|
|
47
|
+
* the user must have the **USE_CATALOG** privilege on the referenced parent table's catalog,
|
|
48
|
+
* the **USE_SCHEMA** privilege on the referenced parent table's schema,
|
|
49
|
+
* and be the owner of the referenced parent table.
|
|
50
|
+
*/
|
|
51
|
+
createTableConstraint(req: CreateTableConstraintRequest, options?: CallOptions): Promise<TableConstraint>;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes a table from the specified parent catalog and schema.
|
|
54
|
+
* The caller must be the owner of the parent catalog, have the **USE_CATALOG** privilege on the parent catalog and be the owner of the parent schema,
|
|
55
|
+
* or be the owner of the table and have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
|
|
56
|
+
*/
|
|
57
|
+
deleteTable(req: DeleteTableRequest, options?: CallOptions): Promise<DeleteTableResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a table constraint.
|
|
60
|
+
*
|
|
61
|
+
* For the table constraint deletion to succeed, the user must satisfy both of these conditions:
|
|
62
|
+
* - the user must have the **USE_CATALOG** privilege on the table's parent catalog,
|
|
63
|
+
* the **USE_SCHEMA** privilege on the table's parent schema, and be the owner of the table.
|
|
64
|
+
* - if __cascade__ argument is **true**, the user must have the following permissions on all of the child tables:
|
|
65
|
+
* the **USE_CATALOG** privilege on the table's catalog,
|
|
66
|
+
* the **USE_SCHEMA** privilege on the table's schema,
|
|
67
|
+
* and be the owner of the table.
|
|
68
|
+
*/
|
|
69
|
+
deleteTableConstraint(req: DeleteTableConstraintRequest, options?: CallOptions): Promise<DeleteTableConstraintResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Gets a table from the metastore for a specific catalog and schema.
|
|
72
|
+
* The caller must satisfy one of the following requirements:
|
|
73
|
+
* * Be a metastore admin
|
|
74
|
+
* * Be the owner of the parent catalog
|
|
75
|
+
* * Be the owner of the parent schema and have the **USE_CATALOG** privilege on the parent catalog
|
|
76
|
+
* * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema,
|
|
77
|
+
* and either be the table owner or have the **SELECT** privilege on the table.
|
|
78
|
+
*/
|
|
79
|
+
getTable(req: GetTableRequest, options?: CallOptions): Promise<TableInfo>;
|
|
80
|
+
/**
|
|
81
|
+
* Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
|
|
82
|
+
*
|
|
83
|
+
* * summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or:
|
|
84
|
+
* * summaries for tables and schemas (within the current metastore and parent catalog)
|
|
85
|
+
* for which the user has ownership or the **SELECT** privilege on the table and ownership or **USE_SCHEMA** privilege on the schema,
|
|
86
|
+
* provided that the user also has ownership or the **USE_CATALOG** privilege on the parent catalog.
|
|
87
|
+
*
|
|
88
|
+
* There is no guarantee of a specific ordering of the elements in the array.
|
|
89
|
+
*
|
|
90
|
+
* PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token.
|
|
91
|
+
* Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
|
|
92
|
+
*/
|
|
93
|
+
listTableSummaries(req: ListTableSummariesRequest, options?: CallOptions): Promise<ListTableSummariesResponse>;
|
|
94
|
+
listTableSummariesIter(req: ListTableSummariesRequest, options?: CallOptions): AsyncGenerator<TableSummary>;
|
|
95
|
+
/**
|
|
96
|
+
* Gets an array of all tables for the current metastore under the parent catalog and schema.
|
|
97
|
+
* The caller must be a metastore admin or an owner of (or have the **SELECT** privilege on) the table.
|
|
98
|
+
* For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
|
|
99
|
+
* There is no guarantee of a specific ordering of the elements in the array.
|
|
100
|
+
*
|
|
101
|
+
* NOTE: **view_dependencies** and **table_constraints** are not returned by ListTables queries.
|
|
102
|
+
*
|
|
103
|
+
* NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.
|
|
104
|
+
*
|
|
105
|
+
* PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
|
|
106
|
+
* Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
|
|
107
|
+
*/
|
|
108
|
+
listTables(req: ListTablesRequest, options?: CallOptions): Promise<ListTablesResponse>;
|
|
109
|
+
listTablesIter(req: ListTablesRequest, options?: CallOptions): AsyncGenerator<TableInfo>;
|
|
110
|
+
/**
|
|
111
|
+
* Gets if a table exists in the metastore for a specific catalog and schema.
|
|
112
|
+
* The caller must satisfy one of the following requirements:
|
|
113
|
+
* * Be a metastore admin
|
|
114
|
+
* * Be the owner of the parent catalog
|
|
115
|
+
* * Be the owner of the parent schema and have the **USE_CATALOG** privilege on the parent catalog
|
|
116
|
+
* * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema,
|
|
117
|
+
* and either be the table owner or have the **SELECT** privilege on the table.
|
|
118
|
+
* * Have **BROWSE** privilege on the parent catalog
|
|
119
|
+
* * Have **BROWSE** privilege on the parent schema
|
|
120
|
+
*/
|
|
121
|
+
tableExists(req: TableExistsRequest, options?: CallOptions): Promise<TableExistsResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* Change the owner of the table.
|
|
124
|
+
* The caller must be the owner of the parent catalog, have the **USE_CATALOG** privilege on the parent catalog and be the owner of the parent schema,
|
|
125
|
+
* or be the owner of the table and have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
|
|
126
|
+
*/
|
|
127
|
+
updateTable(req: UpdateTableRequest, options?: CallOptions): Promise<UpdateTableResponse>;
|
|
126
128
|
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { TablesClient };
|
|
127
131
|
//# 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":";;;;;cA0Da,YAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,SAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAUb,aAAA;EAiCI;;;;;;;;;;;;;;;;;;;;;;;;;;EAFN,WAAA,CACJ,GAAA,EAAK,kBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,SAAA;EA0SJ;;;;;;;;;;;EArQD,qBAAA,CACJ,GAAA,EAAK,4BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,eAAA;EA4XJ;;;;;EA7VD,WAAA,CACJ,GAAA,EAAK,kBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,mBAAA;EAjIM;;;;;;;;;;;EAqKX,qBAAA,CACJ,GAAA,EAAK,4BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,6BAAA;EAlHT;;;;;;;;;EAgKI,QAAA,CACJ,GAAA,EAAK,eAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,SAAA;EA3FL;;;;;;;;;;;;;EAgJA,kBAAA,CACJ,GAAA,EAAK,yBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,0BAAA;EAiDJ,sBAAA,CACL,GAAA,EAAK,yBAAA,EACL,OAAA,GAAU,WAAA,GACT,cAAA,CAAe,YAAA;EA9GX;;;;;;;;;;;;;EAyID,UAAA,CACJ,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,kBAAA;EA0DJ,cAAA,CACL,GAAA,EAAK,iBAAA,EACL,OAAA,GAAU,WAAA,GACT,cAAA,CAAe,SAAA;EA7FhB;;;;;;;;;;;EAsHI,WAAA,CACJ,GAAA,EAAK,kBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,mBAAA;EA/BJ;;;;;EA6DD,WAAA,CACJ,GAAA,EAAK,kBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,mBAAA;AAAA"}
|