protected class BaseMetastoreViewCatalog.BaseViewBuilder extends java.lang.Object implements ViewBuilder
Modifier | Constructor and Description |
---|---|
protected |
BaseViewBuilder(TableIdentifier identifier) |
Modifier and Type | Method and Description |
---|---|
View |
create()
Create the view.
|
View |
createOrReplace()
Create or replace the view.
|
View |
replace()
Replace the view.
|
ViewBuilder |
withDefaultCatalog(java.lang.String catalog)
Set the default catalog to use for the view.
|
ViewBuilder |
withDefaultNamespace(Namespace namespace)
Set the default namespace to use for the view.
|
ViewBuilder |
withLocation(java.lang.String newLocation)
Sets a location for the view
|
ViewBuilder |
withProperties(java.util.Map<java.lang.String,java.lang.String> newProperties)
Add key/value properties to the view.
|
ViewBuilder |
withProperty(java.lang.String key,
java.lang.String value)
Add a key/value property to the view.
|
ViewBuilder |
withQuery(java.lang.String dialect,
java.lang.String sql)
Add a view representation for the given dialect and the SQL to the view.
|
ViewBuilder |
withSchema(Schema newSchema)
Set the view schema.
|
protected BaseViewBuilder(TableIdentifier identifier)
public ViewBuilder withSchema(Schema newSchema)
VersionBuilder
withSchema
in interface VersionBuilder<ViewBuilder>
newSchema
- The schema to use for this view versionpublic ViewBuilder withQuery(java.lang.String dialect, java.lang.String sql)
VersionBuilder
withQuery
in interface VersionBuilder<ViewBuilder>
dialect
- The dialect of the view representationsql
- The SQL of the view representationpublic ViewBuilder withDefaultCatalog(java.lang.String catalog)
VersionBuilder
withDefaultCatalog
in interface VersionBuilder<ViewBuilder>
catalog
- The default catalog to use when the SQL does not contain a catalogpublic ViewBuilder withDefaultNamespace(Namespace namespace)
VersionBuilder
withDefaultNamespace
in interface VersionBuilder<ViewBuilder>
namespace
- The default namespace to use when the SQL does not contain a namespacepublic ViewBuilder withProperties(java.util.Map<java.lang.String,java.lang.String> newProperties)
ViewBuilder
withProperties
in interface ViewBuilder
newProperties
- key/value propertiespublic ViewBuilder withProperty(java.lang.String key, java.lang.String value)
ViewBuilder
withProperty
in interface ViewBuilder
key
- a keyvalue
- a valuepublic ViewBuilder withLocation(java.lang.String newLocation)
ViewBuilder
withLocation
in interface ViewBuilder
newLocation
- the location to set for the viewpublic View create()
ViewBuilder
create
in interface ViewBuilder
public View replace()
ViewBuilder
replace
in interface ViewBuilder
View
replacedpublic View createOrReplace()
ViewBuilder
createOrReplace
in interface ViewBuilder
View
created or replaced