Package org.apache.iceberg.catalog
Interface ViewCatalog
- All Known Implementing Classes:
- BaseMetastoreViewCatalog,- BaseViewSessionCatalog.AsViewCatalog,- HiveCatalog,- InMemoryCatalog,- JdbcCatalog,- NessieCatalog,- RESTCatalog
public interface ViewCatalog
A Catalog API for view create, drop, and load operations.
- 
Method SummaryModifier and TypeMethodDescriptionbuildView(TableIdentifier identifier) Instantiate a builder to create or replace a SQL view.booleandropView(TableIdentifier identifier) Drop a view.default voidinitialize(String name, Map<String, String> properties) Initialize a view catalog given a custom name and a map of catalog properties.default voidinvalidateView(TableIdentifier identifier) Invalidate cached view metadata from current catalog.Return all the identifiers under this namespace.loadView(TableIdentifier identifier) Load a view.name()Return the name for this catalog.voidrenameView(TableIdentifier from, TableIdentifier to) Rename a view.default booleanviewExists(TableIdentifier identifier) Check whether view exists.
- 
Method Details- 
nameString name()Return the name for this catalog.- Returns:
- this catalog's name
 
- 
listViewsReturn all the identifiers under this namespace.- Parameters:
- namespace- a namespace
- Returns:
- a list of identifiers for views
- Throws:
- NoSuchNamespaceException- if the namespace is not found
 
- 
loadViewLoad a view.- Parameters:
- identifier- a view identifier
- Returns:
- instance of Viewimplementation referred by the identifier
- Throws:
- NoSuchViewException- if the view does not exist
 
- 
viewExistsCheck whether view exists.- Parameters:
- identifier- a view identifier
- Returns:
- true if the view exists, false otherwise
 
- 
buildViewInstantiate a builder to create or replace a SQL view.- Parameters:
- identifier- a view identifier
- Returns:
- a view builder
 
- 
dropViewDrop a view.- Parameters:
- identifier- a view identifier
- Returns:
- true if the view was dropped, false if the view did not exist
 
- 
renameViewRename a view.- Parameters:
- from- identifier of the view to rename
- to- new view identifier
- Throws:
- NoSuchViewException- if the "from" view does not exist
- AlreadyExistsException- if the "to" view already exists
- NoSuchNamespaceException- if the "to" namespace doesn't exist
 
- 
invalidateViewInvalidate cached view metadata from current catalog.If the view is already loaded or cached, drop cached data. If the view does not exist or is not cached, do nothing. - Parameters:
- identifier- a view identifier
 
- 
initializeInitialize a view catalog given a custom name and a map of catalog properties.A custom view catalog implementation must have a no-arg constructor. A compute engine like Spark or Flink will first initialize the catalog without any arguments, and then call this method to complete catalog initialization with properties passed into the engine. - Parameters:
- name- a custom name for the catalog
- properties- catalog properties
 
 
-