Writer classes

Writer classes

Functions

Properties

gpointer record-batch-writer Write / Construct Only
gpointer feather-table-writer Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GArrowFeatherFileWriter
    ├── GArrowRecordBatchWriter
       ╰── GArrowRecordBatchStreamWriter
           ╰── GArrowRecordBatchFileWriter
    ╰── GArrowRecordBatchWriter
        ╰── GArrowRecordBatchStreamWriter
            ╰── GArrowRecordBatchFileWriter

Includes

#include <arrow-glib/arrow-glib.h>

Description

GArrowRecordBatchWriter is a base class for writing record batches in stream format into output.

GArrowRecordBatchStreamWriter is a base class for writing record batches in stream format into output synchronously.

GArrowRecordBatchFileWriter is a class for writing record batches in file format into output.

GArrowFeatherFileWriter is a class for writing arrays in Feather file format into output.

Functions

garrow_record_batch_writer_write_record_batch ()

gboolean
garrow_record_batch_writer_write_record_batch
                               (GArrowRecordBatchWriter *writer,
                                GArrowRecordBatch *record_batch,
                                GError **error);

Parameters

writer

A GArrowRecordBatchWriter.

 

record_batch

The record batch to be written.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since 0.4.0


garrow_record_batch_writer_close ()

gboolean
garrow_record_batch_writer_close (GArrowRecordBatchWriter *writer,
                                  GError **error);

Parameters

writer

A GArrowRecordBatchWriter.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since 0.4.0


garrow_record_batch_stream_writer_new ()

GArrowRecordBatchStreamWriter *
garrow_record_batch_stream_writer_new (GArrowOutputStream *sink,
                                       GArrowSchema *schema,
                                       GError **error);

Parameters

sink

The output of the writer.

 

schema

The schema of the writer.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

A newly created GArrowRecordBatchStreamWriter or NULL on error.

[nullable]

Since 0.4.0


garrow_record_batch_file_writer_new ()

GArrowRecordBatchFileWriter *
garrow_record_batch_file_writer_new (GArrowOutputStream *sink,
                                     GArrowSchema *schema,
                                     GError **error);

Parameters

sink

The output of the writer.

 

schema

The schema of the writer.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

A newly created GArrowRecordBatchFileWriter or NULL on error.

[nullable]

Since 0.4.0


garrow_feather_file_writer_new ()

GArrowFeatherFileWriter *
garrow_feather_file_writer_new (GArrowOutputStream *sink,
                                GError **error);

Parameters

sink

The output of the writer.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

A newly created GArrowFeatherFileWriter or NULL on error.

[nullable]

Since 0.4.0


garrow_feather_file_writer_set_description ()

void
garrow_feather_file_writer_set_description
                               (GArrowFeatherFileWriter *writer,
                                const gchar *description);

Parameters

writer

A GArrowFeatherFileWriter.

 

description

The description of the file.

 

Since 0.4.0


garrow_feather_file_writer_set_n_rows ()

void
garrow_feather_file_writer_set_n_rows (GArrowFeatherFileWriter *writer,
                                       gint64 n_rows);

Parameters

writer

A GArrowFeatherFileWriter.

 

n_rows

The number of rows in the file.

 

Since 0.4.0


garrow_feather_file_writer_append ()

gboolean
garrow_feather_file_writer_append (GArrowFeatherFileWriter *writer,
                                   const gchar *name,
                                   GArrowArray *array,
                                   GError **error);

Parameters

writer

A GArrowFeatherFileWriter.

 

name

The name of the array to be appended.

 

array

The array to be appended.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since 0.4.0


garrow_feather_file_writer_close ()

gboolean
garrow_feather_file_writer_close (GArrowFeatherFileWriter *writer,
                                  GError **error);

Parameters

writer

A GArrowFeatherFileWriter.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since 0.4.0

Types and Values

struct GArrowRecordBatchWriter

struct GArrowRecordBatchWriter;

It wraps arrow::ipc::RecordBatchWriter.


struct GArrowRecordBatchStreamWriter

struct GArrowRecordBatchStreamWriter;

It wraps arrow::ipc::RecordBatchStreamWriter.


struct GArrowRecordBatchFileWriter

struct GArrowRecordBatchFileWriter;

It wraps arrow::ipc::RecordBatchFileWriter.


struct GArrowFeatherFileWriter

struct GArrowFeatherFileWriter;

It wraps arrow::ipc::feather::TableWriter.

Property Details

The “record-batch-writer” property

  “record-batch-writer”      gpointer

The raw std::shared<arrow::ipc::RecordBatchWriter> *.

Flags: Write / Construct Only


The “feather-table-writer” property

  “feather-table-writer”     gpointer

The raw std::shared<arrow::ipc::feather::TableWriter> *.

Flags: Write / Construct Only