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 IcebergTableOptionsDeprecated.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.abstract StringThe namespace.schema()static booleanIf theschemasupportsIcebergTableOptions.final Tabletable()Load astatic-modeTable.final IcebergTabletable(IcebergReadInstructions readInstructions) Load theTablewith the givenreadInstructions.final EnterpriseTableKeytableKey()Deprecated.prefernamespace()andtableName()abstract StringThe table name.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
Deprecated.useload(Schema)Loads the options from theschema. The Schema must have anextended storagetypeof "iceberg" and have thenamespace setSYSTEM.- Parameters:
schema- the schemaintraday- unused- Returns:
- the options
-
supports
If theschemasupportsIcebergTableOptions.- Parameters:
schema- the schema- Returns:
trueifschemasupportsIcebergTableOptions.
-
load
Loads the options from theschema. The Schema must have anextended storagetypeof "iceberg" and have thenamespace setSYSTEM.- Parameters:
schema- the schema- Returns:
- the options
-
tableKey
Deprecated.prefernamespace()andtableName()The table key, always of the typeTableType.SYSTEM_PERMANENT. Equivalent tonew EnterpriseTableKeyImpl(namespace(), tableName(), TableType.SYSTEM_PERMANENT).- Returns:
- the table key
-
namespace
The namespace.- Returns:
- the namespace
-
tableName
The table name.- Returns:
- the table name
-
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 astatic-modeTable. Equivalent totable(IcebergReadInstructions.builder().updateMode(IcebergUpdateMode.staticMode()).build()).- 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
-
load(Schema)