Reads data from Apache Iceberg tables using daft. Provides support for reading Iceberg table data as DataFrames with lazy evaluation.
IcebergInput reads data from Apache Iceberg tables using daft. Provides support for reading Iceberg table data as DataFrames. Note: get_batched_dataframe() and get_batched_daft_dataframe() aren't implemented due to memory concerns with partitioning large Iceberg tables.
IcebergInput inherits from the base Input class and provides specialized functionality for reading from Apache Iceberg tables.
IcebergInput
Classapplication_sdk.inputs.icebergInputReads data from Apache Iceberg tables using daft. Provides support for reading Iceberg table data as DataFrames. Note: get_batched_dataframe() and get_batched_daft_dataframe() aren't implemented due to memory concerns with partitioning large Iceberg tables.
Methods5
__init__
__init__(self, table: Table, chunk_size: Optional[int] = 100000)Parameters
tableTablechunk_sizeOptional[int]get_dataframe
async get_dataframe(self) -> pd.DataFrameReturns
pd.DataFrame - Complete table data as pandas DataFrameget_daft_dataframe
async get_daft_dataframe(self) -> daft.DataFrameReturns
daft.DataFrame - Table data as daft DataFrame with lazy evaluationget_batched_dataframe
async get_batched_dataframe(self) -> AsyncIterator[pd.DataFrame]Returns
NotImplementedError - Raises NotImplementedErrorget_batched_daft_dataframe
async get_batched_daft_dataframe(self) -> AsyncIterator[daft.DataFrame]Returns
NotImplementedError - Raises NotImplementedErrorUsage Examples
Read Iceberg table
Initialize with Iceberg table object and read data
from application_sdk.inputs import IcebergInput
from pyiceberg.table import Table
iceberg_input = IcebergInput(
table=iceberg_table, # pyiceberg.table.Table instance
chunk_size=100000
)
df = await iceberg_input.get_dataframe()
See also
- Inputs: Overview of all input classes and common usage patterns
- SQLQueryInput: Read data from SQL databases by executing SQL queries
- ParquetInput: Read data from Parquet files, supporting single files and directories
- Application SDK README: Overview of the Application SDK and its components