Class BaseMetastoreViewCatalog.BaseViewBuilder

java.lang.Object
org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseViewBuilder
All Implemented Interfaces:
VersionBuilder<ViewBuilder>, ViewBuilder
Enclosing class:
BaseMetastoreViewCatalog

protected class BaseMetastoreViewCatalog.BaseViewBuilder extends Object implements ViewBuilder
  • Constructor Details

  • Method Details

    • withSchema

      public ViewBuilder withSchema(Schema newSchema)
      Description copied from interface: VersionBuilder
      Set the view schema.
      Specified by:
      withSchema in interface VersionBuilder<ViewBuilder>
      Parameters:
      newSchema - The schema to use for this view version
      Returns:
      this for method chaining
    • withQuery

      public ViewBuilder withQuery(String dialect, String sql)
      Description copied from interface: VersionBuilder
      Add a view representation for the given dialect and the SQL to the view.
      Specified by:
      withQuery in interface VersionBuilder<ViewBuilder>
      Parameters:
      dialect - The dialect of the view representation
      sql - The SQL of the view representation
      Returns:
      this for method chaining
    • withDefaultCatalog

      public ViewBuilder withDefaultCatalog(String catalog)
      Description copied from interface: VersionBuilder
      Set the default catalog to use for the view.
      Specified by:
      withDefaultCatalog in interface VersionBuilder<ViewBuilder>
      Parameters:
      catalog - The default catalog to use when the SQL does not contain a catalog
      Returns:
      this for method chaining
    • withDefaultNamespace

      public ViewBuilder withDefaultNamespace(Namespace namespace)
      Description copied from interface: VersionBuilder
      Set the default namespace to use for the view.
      Specified by:
      withDefaultNamespace in interface VersionBuilder<ViewBuilder>
      Parameters:
      namespace - The default namespace to use when the SQL does not contain a namespace
      Returns:
      this for method chaining
    • withProperties

      public ViewBuilder withProperties(Map<String,String> newProperties)
      Description copied from interface: ViewBuilder
      Add key/value properties to the view.
      Specified by:
      withProperties in interface ViewBuilder
      Parameters:
      newProperties - key/value properties
      Returns:
      this for method chaining
    • withProperty

      public ViewBuilder withProperty(String key, String value)
      Description copied from interface: ViewBuilder
      Add a key/value property to the view.
      Specified by:
      withProperty in interface ViewBuilder
      Parameters:
      key - a key
      value - a value
      Returns:
      this for method chaining
    • withLocation

      public ViewBuilder withLocation(String newLocation)
      Description copied from interface: ViewBuilder
      Sets a location for the view
      Specified by:
      withLocation in interface ViewBuilder
      Parameters:
      newLocation - the location to set for the view
      Returns:
      this for method chaining
    • create

      public View create()
      Description copied from interface: ViewBuilder
      Create the view.
      Specified by:
      create in interface ViewBuilder
      Returns:
      the view created
    • replace

      public View replace()
      Description copied from interface: ViewBuilder
      Replace the view.
      Specified by:
      replace in interface ViewBuilder
      Returns:
      the View replaced
    • createOrReplace

      public View createOrReplace()
      Description copied from interface: ViewBuilder
      Create or replace the view.
      Specified by:
      createOrReplace in interface ViewBuilder
      Returns:
      the View created or replaced