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)
VersionBuilderwithSchema in interface VersionBuilder<ViewBuilder>newSchema - The schema to use for this view versionpublic ViewBuilder withQuery(java.lang.String dialect, java.lang.String sql)
VersionBuilderwithQuery in interface VersionBuilder<ViewBuilder>dialect - The dialect of the view representationsql - The SQL of the view representationpublic ViewBuilder withDefaultCatalog(java.lang.String catalog)
VersionBuilderwithDefaultCatalog in interface VersionBuilder<ViewBuilder>catalog - The default catalog to use when the SQL does not contain a catalogpublic ViewBuilder withDefaultNamespace(Namespace namespace)
VersionBuilderwithDefaultNamespace 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)
ViewBuilderwithProperties in interface ViewBuildernewProperties - key/value propertiespublic ViewBuilder withProperty(java.lang.String key, java.lang.String value)
ViewBuilderwithProperty in interface ViewBuilderkey - a keyvalue - a valuepublic ViewBuilder withLocation(java.lang.String newLocation)
ViewBuilderwithLocation in interface ViewBuildernewLocation - the location to set for the viewpublic View create()
ViewBuildercreate in interface ViewBuilderpublic View replace()
ViewBuilderreplace in interface ViewBuilderView replacedpublic View createOrReplace()
ViewBuildercreateOrReplace in interface ViewBuilderView created or replaced