Interface ViewBuilder

All Superinterfaces:
VersionBuilder<ViewBuilder>
All Known Implementing Classes:
BaseMetastoreViewCatalog.BaseViewBuilder

public interface ViewBuilder extends VersionBuilder<ViewBuilder>
A builder used to create or replace a SQL View.

Call ViewCatalog.buildView(org.apache.iceberg.catalog.TableIdentifier) to create a new builder.

  • Method Details

    • withProperties

      ViewBuilder withProperties(Map<String,String> properties)
      Add key/value properties to the view.
      Parameters:
      properties - key/value properties
      Returns:
      this for method chaining
    • withProperty

      ViewBuilder withProperty(String key, String value)
      Add a key/value property to the view.
      Parameters:
      key - a key
      value - a value
      Returns:
      this for method chaining
    • withLocation

      default ViewBuilder withLocation(String location)
      Sets a location for the view
      Parameters:
      location - the location to set for the view
      Returns:
      this for method chaining
    • create

      View create()
      Create the view.
      Returns:
      the view created
    • replace

      View replace()
      Replace the view.
      Returns:
      the View replaced
    • createOrReplace

      View createOrReplace()
      Create or replace the view.
      Returns:
      the View created or replaced