@PublicEvolving public class JdbcCatalog extends AbstractJdbcCatalog
baseUrl, defaultUrl, pwd, username
Constructor and Description |
---|
JdbcCatalog(String catalogName,
String defaultDatabase,
String username,
String pwd,
String baseUrl) |
Modifier and Type | Method and Description |
---|---|
CatalogDatabase |
getDatabase(String databaseName)
Get a database from this catalog.
|
AbstractJdbcCatalog |
getInternal() |
CatalogBaseTable |
getTable(ObjectPath tablePath)
|
List<String> |
listDatabases()
Get the names of all databases in this catalog.
|
List<String> |
listTables(String databaseName)
Get names of all tables and views under this database.
|
boolean |
tableExists(ObjectPath tablePath)
Check if a table or view exists in this catalog.
|
alterDatabase, alterFunction, alterPartition, alterPartitionColumnStatistics, alterPartitionStatistics, alterTable, alterTableColumnStatistics, alterTableStatistics, close, createDatabase, createFunction, createPartition, createTable, databaseExists, dropDatabase, dropFunction, dropPartition, dropTable, functionExists, getBaseUrl, getFactory, getFunction, getPartition, getPartitionColumnStatistics, getPartitionStatistics, getPassword, getPrimaryKey, getTableColumnStatistics, getTableStatistics, getUsername, listFunctions, listPartitions, listPartitions, listPartitionsByFilter, listViews, open, partitionExists, renameTable
getDefaultDatabase, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dropDatabase, getFunctionDefinitionFactory, getTableFactory
public List<String> listDatabases() throws CatalogException
Catalog
CatalogException
- in case of any runtime exceptionpublic CatalogDatabase getDatabase(String databaseName) throws DatabaseNotExistException, CatalogException
Catalog
databaseName
- Name of the databaseDatabaseNotExistException
- if the database does not existCatalogException
- in case of any runtime exceptionpublic List<String> listTables(String databaseName) throws DatabaseNotExistException, CatalogException
Catalog
DatabaseNotExistException
- if the database does not existCatalogException
- in case of any runtime exceptionpublic CatalogBaseTable getTable(ObjectPath tablePath) throws TableNotExistException, CatalogException
Catalog
CatalogTable
or CatalogView
identified by the given ObjectPath
. The framework will resolve the metadata objects when necessary.tablePath
- Path of the table or viewTableNotExistException
- if the target does not existCatalogException
- in case of any runtime exceptionpublic boolean tableExists(ObjectPath tablePath) throws CatalogException
Catalog
tablePath
- Path of the table or viewCatalogException
- in case of any runtime exception@VisibleForTesting public AbstractJdbcCatalog getInternal()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.