IcebergReadInstructions
The IcebergReadInstructions
class provides instructions for reading Iceberg catalogs and tables.
Constructors
An IcebergReadInstructions
object is constructed using its builder:
import io.deephaven.iceberg.util.*
instructions = IcebergReadInstructions.builder()
.dataInstructions(s3Instructions)
.ignoreResolvingErrors(ignoreResolvingErrors)
.snapshot(snapshot)
.snapshotId(snapshotId)
.updateMode(updateMode)
.build()
Parameters
The following parameters can be set using the builder:
s3Instructions
: Instructions for accessing data in S3-compatible storage. Can be an arbitrary object, but is typically an instance ofio.deephaven.extensions.s3.S3Instructions
.ignoreResolvingErrors
: Controls whether to ignore unexpected resolving errors by silently returningnull
data for columns that can't be resolved.snapshot
: Theorg.apache.iceberg.Snapshot
to read. If not specified, the latest snapshot is used.snapshotId
: The ID of the snapshot to read. If not specified, the latest snapshot is used.updateMode
: TheIcebergUpdateMode
to use when reading the table.
Methods
dataInstructions
: The data instructions to use for reading Iceberg data files.ignoreResolvingErrors
: Controls whether to ignore unexpected resolving errors by silently returningnull
data for columns that can't be resolved.snapshot
: The snapshot to load for reading.snapshotId
: The snapshot ID to load for reading.updateMode
: TheIcebergUpdateMode
to use when reading Iceberg data files.withSnapshot
: Return a copy of the instructions with the snapshot replaced by the specified snapshot.withSnapshotId
: Return a copy of the instructions with the snapshot ID replaced by the specified snapshot ID.
Examples
The following example constructs an IcebergReadInstructions
object, specifying to ignore resolving errors, read a specific snapshot ID, and that the Iceberg table is static:
import io.deephaven.iceberg.util.*
instructions = IcebergReadInstructions.builder()
.ignoreResolvingErrors(true)
.snapshotId(1234567890)
.updateMode(IcebergUpdateMode.staticMode())
.build()