public interface ConnectorMetadata
| Modifier and Type | Method and Description |
|---|---|
ConnectorOutputTableHandle |
beginCreateTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Begin the atomic creation of a table with data.
|
ConnectorInsertTableHandle |
beginInsert(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin insert query
|
boolean |
canCreateSampledTables(ConnectorSession session)
Returns true if this catalog supports creation of sampled tables
|
void |
commitCreateTable(ConnectorOutputTableHandle tableHandle,
Collection<String> fragments)
Commit a table creation with data after the data is written.
|
void |
commitInsert(ConnectorInsertTableHandle insertHandle,
Collection<String> fragments)
Commit insert query
|
ConnectorTableHandle |
createTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Creates a table using the specified table metadata.
|
void |
createView(ConnectorSession session,
SchemaTableName viewName,
String viewData,
boolean replace)
Create the specified view.
|
void |
dropTable(ConnectorTableHandle tableHandle)
Drops the specified table
|
void |
dropView(ConnectorSession session,
SchemaTableName viewName)
Drop the specified view.
|
Map<String,ConnectorColumnHandle> |
getColumnHandles(ConnectorTableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.
|
ColumnMetadata |
getColumnMetadata(ConnectorTableHandle tableHandle,
ConnectorColumnHandle columnHandle)
Gets the metadata for the specified table column.
|
ConnectorColumnHandle |
getSampleWeightColumnHandle(ConnectorTableHandle tableHandle)
Returns the handle for the sample weight column, or null if the table does not contain sampled data.
|
ConnectorTableHandle |
getTableHandle(ConnectorSession session,
SchemaTableName tableName)
Returns a table handle for the specified table name, or null if the connector does not contain the table.
|
ConnectorTableMetadata |
getTableMetadata(ConnectorTableHandle table)
Return the metadata for the specified table handle.
|
Map<SchemaTableName,String> |
getViews(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the view data for views that match the specified table prefix.
|
List<String> |
listSchemaNames(ConnectorSession session)
Returns the schemas provided by this connector.
|
Map<SchemaTableName,List<ColumnMetadata>> |
listTableColumns(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
|
List<SchemaTableName> |
listTables(ConnectorSession session,
String schemaNameOrNull)
List table names, possibly filtered by schema.
|
List<SchemaTableName> |
listViews(ConnectorSession session,
String schemaNameOrNull)
List view names, possibly filtered by schema.
|
void |
renameTable(ConnectorTableHandle tableHandle,
SchemaTableName newTableName)
Rename the specified table
|
List<String> listSchemaNames(ConnectorSession session)
ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
ConnectorTableMetadata getTableMetadata(ConnectorTableHandle table)
RuntimeException - if table handle is no longer validList<SchemaTableName> listTables(ConnectorSession session, String schemaNameOrNull)
ConnectorColumnHandle getSampleWeightColumnHandle(ConnectorTableHandle tableHandle)
RuntimeException - if the table handle is no longer validboolean canCreateSampledTables(ConnectorSession session)
Map<String,ConnectorColumnHandle> getColumnHandles(ConnectorTableHandle tableHandle)
RuntimeException - if table handle is no longer validColumnMetadata getColumnMetadata(ConnectorTableHandle tableHandle, ConnectorColumnHandle columnHandle)
RuntimeException - if table or column handles are no longer validMap<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorTableHandle createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
void dropTable(ConnectorTableHandle tableHandle)
RuntimeException - if the table can not be dropped or table handle is no longer validvoid renameTable(ConnectorTableHandle tableHandle, SchemaTableName newTableName)
ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
void commitCreateTable(ConnectorOutputTableHandle tableHandle, Collection<String> fragments)
ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
void commitInsert(ConnectorInsertTableHandle insertHandle, Collection<String> fragments)
void createView(ConnectorSession session, SchemaTableName viewName, String viewData, boolean replace)
void dropView(ConnectorSession session, SchemaTableName viewName)
List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull)
Map<SchemaTableName,String> getViews(ConnectorSession session, SchemaTablePrefix prefix)
Copyright © 2012-2014. All Rights Reserved.