Package org.apache.iceberg.view
Class BaseMetastoreViewCatalog.BaseViewBuilder
java.lang.Object
org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseViewBuilder
- All Implemented Interfaces:
VersionBuilder<ViewBuilder>
,ViewBuilder
- Enclosing class:
- BaseMetastoreViewCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create the view.Create or replace the view.replace()
Replace the view.withDefaultCatalog
(String catalog) Set the default catalog to use for the view.withDefaultNamespace
(Namespace namespace) Set the default namespace to use for the view.withLocation
(String newLocation) Sets a location for the viewwithProperties
(Map<String, String> newProperties) Add key/value properties to the view.withProperty
(String key, String value) Add a key/value property to the view.Add a view representation for the given dialect and the SQL to the view.withSchema
(Schema newSchema) Set the view schema.
-
Constructor Details
-
BaseViewBuilder
-
-
Method Details
-
withSchema
Description copied from interface:VersionBuilder
Set the view schema.- Specified by:
withSchema
in interfaceVersionBuilder<ViewBuilder>
- Parameters:
newSchema
- The schema to use for this view version- Returns:
- this for method chaining
-
withQuery
Description copied from interface:VersionBuilder
Add a view representation for the given dialect and the SQL to the view.- Specified by:
withQuery
in interfaceVersionBuilder<ViewBuilder>
- Parameters:
dialect
- The dialect of the view representationsql
- The SQL of the view representation- Returns:
- this for method chaining
-
withDefaultCatalog
Description copied from interface:VersionBuilder
Set the default catalog to use for the view.- Specified by:
withDefaultCatalog
in interfaceVersionBuilder<ViewBuilder>
- Parameters:
catalog
- The default catalog to use when the SQL does not contain a catalog- Returns:
- this for method chaining
-
withDefaultNamespace
Description copied from interface:VersionBuilder
Set the default namespace to use for the view.- Specified by:
withDefaultNamespace
in interfaceVersionBuilder<ViewBuilder>
- Parameters:
namespace
- The default namespace to use when the SQL does not contain a namespace- Returns:
- this for method chaining
-
withProperties
Description copied from interface:ViewBuilder
Add key/value properties to the view.- Specified by:
withProperties
in interfaceViewBuilder
- Parameters:
newProperties
- key/value properties- Returns:
- this for method chaining
-
withProperty
Description copied from interface:ViewBuilder
Add a key/value property to the view.- Specified by:
withProperty
in interfaceViewBuilder
- Parameters:
key
- a keyvalue
- a value- Returns:
- this for method chaining
-
withLocation
Description copied from interface:ViewBuilder
Sets a location for the view- Specified by:
withLocation
in interfaceViewBuilder
- Parameters:
newLocation
- the location to set for the view- Returns:
- this for method chaining
-
create
Description copied from interface:ViewBuilder
Create the view.- Specified by:
create
in interfaceViewBuilder
- Returns:
- the view created
-
replace
Description copied from interface:ViewBuilder
Replace the view.- Specified by:
replace
in interfaceViewBuilder
- Returns:
- the
View
replaced
-
createOrReplace
Description copied from interface:ViewBuilder
Create or replace the view.- Specified by:
createOrReplace
in interfaceViewBuilder
- Returns:
- the
View
created or replaced
-