Package org.apache.iceberg.view
Interface Views
-
- All Known Implementing Classes:
BaseMetastoreViews,HadoopViews,NessieExtCatalog,NessieViewCatalog
public interface ViewsGeneric interface for creating and loading a view implementation.The 'viewIdentifier' field should be interpreted by the underlying implementation (e.g. catalog.database.view_name)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcreate(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)Create a view without replacing any existing view.voiddrop(String viewIdentifier)Drops a view.Viewload(String viewIdentifier)Loads a view by name.ViewDefinitionloadDefinition(String viewIdentifier)Loads a view by name.default voidrename(String oldIdentifier, String newIdentifier)Renames a view.voidreplace(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)Replaces a view.
-
-
-
Method Detail
-
create
void create(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
Create a view without replacing any existing view.- Parameters:
viewIdentifier- view name or locationviewDefinition- SQL metadata of the viewproperties- Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
-
replace
void replace(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
Replaces a view.- Parameters:
viewIdentifier- view name or locationviewDefinition- SQL metadata of the viewproperties- Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
-
load
View load(String viewIdentifier)
Loads a view by name.- Parameters:
viewIdentifier- view name or location- Returns:
- All the metadata of the view
-
loadDefinition
ViewDefinition loadDefinition(String viewIdentifier)
Loads a view by name.- Parameters:
viewIdentifier- view name or location- Returns:
- SQL metadata of the view
-
drop
void drop(String viewIdentifier)
Drops a view.- Parameters:
viewIdentifier- view name or location
-
-