Package io.deephaven.enterprise.iceberg
Class IcebergTableOptions
java.lang.Object
io.deephaven.enterprise.iceberg.IcebergTableOptions
The options to create a
Table from Iceberg.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether Deephaven merge jobs may write to the underlying Iceberg table.static IcebergTableOptions.Builderbuilder()Constructs a newIcebergTableOptions.Builder.abstract BuildCatalogOptionsfinal IcebergCatalogAdapterLoad theIcebergCatalogAdapter.final Optional<TableDefinition>TheTableDefinition.final Schemadeploy()Deploy theschema()to thedefault schema service.final Schemadeploy(SchemaService schemaService) Deploy theschema()to theschemaService.final booleanstatic IcebergTableOptionsLoads the options from theschema.static IcebergTableOptionsLoads the options from thedefault schema servicewith aTableType.SYSTEM_PERMANENTtable key.final IcebergTableAdapterLoad theIcebergTableAdapter.final IcebergTableOptionsIfhasDefinition()istrue, will returnthis; otherwise, a newIcebergTableOptionswith a definition will be inferred.schema()final Tabletable()Load theTable.final Tabletable(IcebergReadInstructions readInstructions) Load theTablewith the givenreadInstructions.abstract EnterpriseTableKeytableKey()The table key, guaranteed to be of the typeTableType.SYSTEM_PERMANENTorTableType.SYSTEM_INTRADAY.abstract LoadTableOptions
-
Constructor Details
-
IcebergTableOptions
public IcebergTableOptions()
-
-
Method Details
-
builder
Constructs a newIcebergTableOptions.Builder.- Returns:
- the builder
-
load
Loads the options from thedefault schema servicewith aTableType.SYSTEM_PERMANENTtable key. TheSchemamust have aextended storagetypeof "iceberg" and have thenamespace setNamespaceSet.SYSTEM.- Parameters:
namespace- the namespacetableName- the tableName- Returns:
- the options
- See Also:
-
load
Loads the options from theschema. The Schema must have anextended storagetypeof "iceberg" and have thenamespace setSYSTEM. ThetableKey()will be derived fromSchema.getNamespace(),Schema.getTableName(), andSchemaInternal.getTableTypeV2(boolean).- Parameters:
schema- the schemaintraday- true if the returned type should reflect an intraday table- Returns:
- the options
-
tableKey
The table key, guaranteed to be of the typeTableType.SYSTEM_PERMANENTorTableType.SYSTEM_INTRADAY.- Returns:
- the table key
-
catalogOptions
-
tableOptions
-
allowMergeFromDeephaven
Whether Deephaven merge jobs may write to the underlying Iceberg table. Disabled by default. -
hasDefinition
public final boolean hasDefinition()- Returns:
- if this has a definition
-
definition
- Returns:
- the definition
-
schema
Constructs a newSYSTEMSchemaifhasDefinition()istrue, and empty otherwise. TheSchemawill have anextended storagetypeof "iceberg". This does not deploy theSchemato theSchemaService.- Returns:
- the schema
-
materialize
IfhasDefinition()istrue, will returnthis; otherwise, a newIcebergTableOptionswith a definition will be inferred. This is useful to ensure that callingschema()on the returned value will have a result.When inferred, the resulting options will have the explicit
IcebergTableAdapter.resolver()and functionally-equivalentIcebergTableAdapter.nameMapping()fromloadTable()ofthis.- Returns:
- options that has a definition
-
createAdapter
Load theIcebergCatalogAdapter.- Returns:
- the Iceberg catalog adapter
-
loadTable
Load theIcebergTableAdapter.- Returns:
- the Iceberg table adapter
-
table
Load theTable. IftableKey()hasEnterpriseTableKey.getTableType()TableType.SYSTEM_INTRADAY,IcebergUpdateMode.autoRefreshingMode()will be used; otherwise,IcebergUpdateMode.staticMode()will be used.- Returns:
- the table
- See Also:
-
table
Load theTablewith the givenreadInstructions.- Parameters:
readInstructions- the read instructions- Returns:
- the table
-
deploy
Deploy theschema()to thedefault schema service. If the namespace does not exist, it will becreated. If theSchemadoes not exist, it will beadded; otherwise, it will beupdated.Delegates to
deploy(SchemaService)usingSchemaServiceFactory.getDefault().- Returns:
- the deployed Schema
- Throws:
IllegalArgumentException- ifhasDefinition()isfalse- See Also:
-
deploy
Deploy theschema()to theschemaService. If the namespace does not exist, it will becreated. If theSchemadoes not exist, it will beadded; otherwise, it will beupdated.- Parameters:
schemaService- the schema service- Returns:
- the deployed Schema
- Throws:
IllegalArgumentException- ifhasDefinition()isfalse
-