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 TypeMethodDescriptionstatic IcebergTableOptions.Builderbuilder()Constructs a newIcebergTableOptions.Builder.final IcebergCatalogAdapterLoad theIcebergCatalogAdapter.final Optional<TableDefinition>TheTableDefinition.final io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schemadeploy()Deploy theschema()to thedefault schema service.final io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schemadeploy(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaService schemaService) Deploy theschema()to theschemaService.final booleanstatic IcebergTableOptionsload(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema schema, boolean intraday) Loads 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.final Optional<io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema>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.
-
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 anextended storagetypeof "iceberg" and have thenamespace setNamespaceSet.SYSTEM.- Parameters:
namespace- the namespacetableName- the tableName- Returns:
- the options
- See Also:
-
load
public static IcebergTableOptions load(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema schema, boolean intraday) Loads the options from theschema. The Schema must have anextended storagetypeof "iceberg" and have thenamespace setSYSTEM. ThetableKey()will be derived fromTableDefinitionSchema.getNamespace(),TableDefinitionSchema.getTableName(), andTableDefinitionSchema.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
-
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
public final io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema 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
public final io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.Schema deploy(io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaService schemaService) 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
-