Avro#

2026-03-11

20 min read time

Applies to Linux

pylibhipdf.io.avro.read_avro(AvroReaderOptions options, Stream stream=None) TableWithMetadata#

Read from Avro format.

The source to read from and options are encapsulated by the options object.

For details, see read_avro().

Parameters#

options: AvroReaderOptions

Settings for controlling reading behavior

streamStream | None

CUDA stream used for device memory operations and kernel launches

class pylibhipdf.io.avro.AvroReaderOptions#

Bases: object

The settings to use for read_avro For details, see cudf::io::avro_reader_options

static builder(SourceInfo source)#

Create a AvroWriterOptionsBuilder object

For details, see cudf::io::avro_reader_options::builder()

Parameters#

sinkSourceInfo

The source to read the Avro file from.

Returns#

AvroReaderOptionsBuilder

Builder to build AvroReaderOptions

set_columns(self, list col_names) void#

Set names of the column to be read.

Parameters#

col_nameslist[str]

List of column names

Returns#

None

class pylibhipdf.io.avro.AvroReaderOptionsBuilder#

Bases: object

build(self) AvroReaderOptions#

Create a AvroReaderOptions object

columns(self, list col_names) AvroReaderOptionsBuilder#

Set names of the column to be read.

Parameters#

col_nameslist

List of column names

Returns#

AvroReaderOptionsBuilder

num_rows(self, size_type num_rows) AvroReaderOptionsBuilder#

Sets number of rows to read.

Parameters#

num_rowssize_type

Number of rows to read after skip

Returns#

AvroReaderOptionsBuilder

skip_rows(self, size_type skip_rows) AvroReaderOptionsBuilder#

Sets number of rows to skip.

Parameters#

skip_rowssize_type

Number of rows to skip from start

Returns#

AvroReaderOptionsBuilder