@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface IDataConnectorProvider
| Modifier and Type | Field and Description |
|---|---|
static DataConnector |
connector |
static String |
DERBY_TYPE |
static String |
HIVE_JDBC_TYPE |
static String |
MSSQL_TYPE |
static String |
MYSQL_TYPE |
static String |
ORACLE_TYPE |
static String |
POSTGRES_TYPE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alterTable(String tableName,
Table newTable)
Alter an existing table in the remote data source.
|
void |
close()
Closes a transport/connection to the datasource.
|
boolean |
createTable(Table table)
Creates a table with the given name in the remote data source.
|
boolean |
dropTable(String tableName)
Drop an existing table with the given name in the remote data source.
|
Table |
getTable(String tableName)
Fetch a single table with the given name, returns a Hive Table object from the remote database
|
List<String> |
getTableNames()
Returns a list of all table names from the remote database.
|
List<Table> |
getTables(String regex)
Returns Hive Table objects from the remote database for tables that match a name pattern.
|
void |
open()
Opens a transport/connection to the datasource.
|
void |
setScope(String databaseName)
Set the scope of this object.
|
static final String MYSQL_TYPE
static final String POSTGRES_TYPE
static final String ORACLE_TYPE
static final String MSSQL_TYPE
static final String DERBY_TYPE
static final String HIVE_JDBC_TYPE
static final DataConnector connector
void open() throws ConnectException, MetaException
MetaException - Throws MetaException if the connector does not have all info for a connection to be setup.ConnectException - if the connection could not be established for some reason.void close()
throws ConnectException
ConnectException - if the connection could not be closed.void setScope(String databaseName)
List<Table> getTables(String regex) throws MetaException
MetaException - To indicate any failures with executing this APIList<String> getTableNames() throws MetaException
MetaException - To indicate any failures with executing this APITable getTable(String tableName) throws MetaException
MetaException - To indicate any failures with executing this APIboolean createTable(Table table) throws MetaException
table - A Hive table object to translate and create in remote data source.MetaException - To indicate any failures in executing this operation.boolean dropTable(String tableName) throws MetaException
tableName - Table name to drop from the remote data source.MetaException - To indicate any failures in executing this operation.boolean alterTable(String tableName, Table newTable) throws MetaException
tableName - Table name to alter in the remote datasource.newTable - New Table object to modify the existing table with.MetaException - To indicate any failures in executing this operation.Copyright © 2024 The Apache Software Foundation. All rights reserved.