Package org.apache.iceberg.view
Interface View
-
- All Known Implementing Classes:
BaseView
public interface View
Interface for view definition.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ViewVersion
currentVersion()
Get the current version for this view, or null if there are no versions.java.util.List<ViewHistoryEntry>
history()
Get the version history of this table.default java.lang.String
location()
Return the view's base location.java.lang.String
name()
java.util.Map<java.lang.String,java.lang.String>
properties()
Return a map of string properties for this view.default ReplaceViewVersion
replaceVersion()
Create a newReplaceViewVersion
to replace the view's current version.Schema
schema()
Return theschema
for this view.java.util.Map<java.lang.Integer,Schema>
schemas()
Return a map ofschema
for this view.default SQLViewRepresentation
sqlFor(java.lang.String dialect)
Returns the view representation for the given SQL dialectdefault UpdateLocation
updateLocation()
Create a newUpdateLocation
to set the view's location.UpdateViewProperties
updateProperties()
Create a newUpdateViewProperties
to update view properties.default java.util.UUID
uuid()
Returns the view's UUIDViewVersion
version(int versionId)
Get a version in this view by ID.java.lang.Iterable<ViewVersion>
versions()
Get the versions of this view.
-
-
-
Method Detail
-
name
java.lang.String name()
-
schemas
java.util.Map<java.lang.Integer,Schema> schemas()
Return a map ofschema
for this view.- Returns:
- this table's schema map
-
currentVersion
ViewVersion currentVersion()
Get the current version for this view, or null if there are no versions.- Returns:
- the current view version.
-
versions
java.lang.Iterable<ViewVersion> versions()
Get the versions of this view.- Returns:
- an Iterable of versions of this view.
-
version
ViewVersion version(int versionId)
Get a version in this view by ID.- Parameters:
versionId
- version ID- Returns:
- a version, or null if the ID cannot be found
-
history
java.util.List<ViewHistoryEntry> history()
Get the version history of this table.- Returns:
- a list of
ViewHistoryEntry
-
properties
java.util.Map<java.lang.String,java.lang.String> properties()
Return a map of string properties for this view.- Returns:
- this view's properties map
-
location
default java.lang.String location()
Return the view's base location.- Returns:
- this view's location
-
updateProperties
UpdateViewProperties updateProperties()
Create a newUpdateViewProperties
to update view properties.- Returns:
- a new
UpdateViewProperties
-
replaceVersion
default ReplaceViewVersion replaceVersion()
Create a newReplaceViewVersion
to replace the view's current version.- Returns:
- a new
ReplaceViewVersion
-
updateLocation
default UpdateLocation updateLocation()
Create a newUpdateLocation
to set the view's location.- Returns:
- a new
UpdateLocation
-
uuid
default java.util.UUID uuid()
Returns the view's UUID- Returns:
- the view's UUID
-
sqlFor
default SQLViewRepresentation sqlFor(java.lang.String dialect)
Returns the view representation for the given SQL dialect- Returns:
- the view representation for the given SQL dialect, or null if no representation could be resolved
-
-