@Generated public class TablesAPI extends Object
A table can be managed or external. From an API perspective, a __VIEW__ is a particular kind of table (rather than a managed or external table).
Constructor and Description |
---|
TablesAPI(ApiClient apiClient)
Regular-use constructor
|
TablesAPI(TablesService mock)
Constructor for mocks
|
Modifier and Type | Method and Description |
---|---|
void |
delete(DeleteTableRequest request)
Delete a table.
|
void |
delete(String fullName) |
TableExistsResponse |
exists(ExistsRequest request)
Get boolean reflecting if table exists.
|
TableExistsResponse |
exists(String fullName) |
TableInfo |
get(GetTableRequest request)
Get a table.
|
TableInfo |
get(String fullName) |
TablesService |
impl() |
Iterable<TableInfo> |
list(ListTablesRequest request)
List tables.
|
Iterable<TableInfo> |
list(String catalogName,
String schemaName) |
Iterable<TableSummary> |
listSummaries(ListSummariesRequest request)
List table summaries.
|
Iterable<TableSummary> |
listSummaries(String catalogName) |
void |
update(String fullName) |
void |
update(UpdateTableRequest request)
Update a table owner.
|
public TablesAPI(ApiClient apiClient)
public TablesAPI(TablesService mock)
public void delete(String fullName)
public void delete(DeleteTableRequest request)
Deletes a table from the specified parent catalog and schema. 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, 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.
public TableExistsResponse exists(String fullName)
public TableExistsResponse exists(ExistsRequest request)
Gets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be the table owner or have the SELECT privilege on the table. * Have BROWSE privilege on the parent catalog * Have BROWSE privilege on the parent schema.
public TableInfo get(GetTableRequest request)
Gets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements: * Be a metastore admin * Be the owner of the parent catalog * Be the owner of the parent schema and have the USE_CATALOG privilege on the parent catalog * Have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema, and either be the table owner or have the SELECT privilege on the table.
public Iterable<TableInfo> list(ListTablesRequest request)
Gets an array of all tables for the current metastore under the parent catalog and schema. The caller must be a metastore admin or an owner of (or have the **SELECT** privilege on) the table. 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. There is no guarantee of a specific ordering of the elements in the array.
public Iterable<TableSummary> listSummaries(String catalogName)
public Iterable<TableSummary> listSummaries(ListSummariesRequest request)
Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
* summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or: * summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the **SELECT** privilege on the table and ownership or **USE_SCHEMA** privilege on the schema, provided that the user also has ownership or the **USE_CATALOG** privilege on the parent catalog.
There is no guarantee of a specific ordering of the elements in the array.
public void update(String fullName)
public void update(UpdateTableRequest request)
Change the owner of the table. 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, 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.
public TablesService impl()
Copyright © 2024. All rights reserved.