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
Constructors -
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:VersionBuilderSet the view schema.- Specified by:
withSchemain interfaceVersionBuilder<ViewBuilder>- Parameters:
newSchema- The schema to use for this view version- Returns:
- this for method chaining
-
withQuery
Description copied from interface:VersionBuilderAdd a view representation for the given dialect and the SQL to the view.- Specified by:
withQueryin 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:VersionBuilderSet the default catalog to use for the view.- Specified by:
withDefaultCatalogin 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:VersionBuilderSet the default namespace to use for the view.- Specified by:
withDefaultNamespacein 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:ViewBuilderAdd key/value properties to the view.- Specified by:
withPropertiesin interfaceViewBuilder- Parameters:
newProperties- key/value properties- Returns:
- this for method chaining
-
withProperty
Description copied from interface:ViewBuilderAdd a key/value property to the view.- Specified by:
withPropertyin interfaceViewBuilder- Parameters:
key- a keyvalue- a value- Returns:
- this for method chaining
-
withLocation
Description copied from interface:ViewBuilderSets a location for the view- Specified by:
withLocationin interfaceViewBuilder- Parameters:
newLocation- the location to set for the view- Returns:
- this for method chaining
-
create
Description copied from interface:ViewBuilderCreate the view.- Specified by:
createin interfaceViewBuilder- Returns:
- the view created
-
replace
Description copied from interface:ViewBuilderReplace the view.- Specified by:
replacein interfaceViewBuilder- Returns:
- the
Viewreplaced
-
createOrReplace
Description copied from interface:ViewBuilderCreate or replace the view.- Specified by:
createOrReplacein interfaceViewBuilder- Returns:
- the
Viewcreated or replaced
-