GParquetArrowFileWriter

GParquetArrowFileWriter — Arrow file writer class

Functions

Properties

gpointer arrow-file-writer Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GParquetArrowFileWriter
    ╰── GParquetWriterProperties

Includes

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

Description

GParquetWriterProperties is a class for the writer properties.

GParquetArrowFileWriter is a class for writer Apache Arrow data to file as Apache Parquet format.

Functions

gparquet_writer_properties_new ()

GParquetWriterProperties *
gparquet_writer_properties_new (void);

Return: A newly created GParquetWriterProperties.

Since: 0.17.0


gparquet_writer_properties_set_compression ()

void
gparquet_writer_properties_set_compression
                               (GParquetWriterProperties *properties,
                                GArrowCompressionType compression_type,
                                const gchar *path);

Parameters

properties

A GParquetWriterProperties.

 

compression_type

A GArrowCompressionType.

 

path

The column path as dot string.

[nullable]

Since: 0.17.0


gparquet_writer_properties_get_compression_path ()

GArrowCompressionType
gparquet_writer_properties_get_compression_path
                               (GParquetWriterProperties *properties,
                                const gchar *path);

Parameters

properties

A GParquetWriterProperties.

 

path

The path as dot string.

 

Returns

The compression type of GParquetWriterProperties.

Since: 0.17.0


gparquet_writer_properties_enable_dictionary ()

void
gparquet_writer_properties_enable_dictionary
                               (GParquetWriterProperties *properties,
                                const gchar *path);

Parameters

properties

A GParquetWriterProperties.

 

path

The column path as dot string.

[nullable]

Since: 0.17.0


gparquet_writer_properties_disable_dictionary ()

void
gparquet_writer_properties_disable_dictionary
                               (GParquetWriterProperties *properties,
                                const gchar *path);

Parameters

properties

A GParquetWriterProperties.

 

path

The column path as dot string.

[nullable]

Since: 0.17.0


gparquet_writer_properties_is_dictionary_enabled ()

gboolean
gparquet_writer_properties_is_dictionary_enabled
                               (GParquetWriterProperties *properties,
                                const gchar *path);

Parameters

properties

A GParquetWriterProperties.

 

path

The path as dot string.

 

Returns

TRUE on dictionary enabled, FALSE on dictionary disabled.

Since: 0.17.0


gparquet_writer_properties_set_dictionary_page_size_limit ()

void
gparquet_writer_properties_set_dictionary_page_size_limit
                               (GParquetWriterProperties *properties,
                                gint64 limit);

Parameters

properties

A GParquetWriterProperties.

 

limit

The dictionary page size limit.

 

Since: 0.17.0


gparquet_writer_properties_get_dictionary_page_size_limit ()

gint64
gparquet_writer_properties_get_dictionary_page_size_limit
                               (GParquetWriterProperties *properties);

Parameters

properties

A GParquetWriterProperties.

 

Returns

The dictionary page size limit.

Since: 0.17.0


gparquet_writer_properties_set_batch_size ()

void
gparquet_writer_properties_set_batch_size
                               (GParquetWriterProperties *properties,
                                gint64 batch_size);

Parameters

properties

A GParquetWriterProperties.

 

batch_size

The batch size.

 

Since: 0.17.0


gparquet_writer_properties_get_batch_size ()

gint64
gparquet_writer_properties_get_batch_size
                               (GParquetWriterProperties *properties);

Parameters

properties

A GParquetWriterProperties.

 

Returns

The batch size.

Since: 0.17.0


gparquet_writer_properties_set_max_row_group_length ()

void
gparquet_writer_properties_set_max_row_group_length
                               (GParquetWriterProperties *properties,
                                gint64 length);

Parameters

properties

A GParquetWriterProperties.

 

length

The max row group length.

 

Since: 0.17.0


gparquet_writer_properties_get_max_row_group_length ()

gint64
gparquet_writer_properties_get_max_row_group_length
                               (GParquetWriterProperties *properties);

Parameters

properties

A GParquetWriterProperties.

 

Returns

The max row group length.

Since: 0.17.0


gparquet_writer_properties_set_data_page_size ()

void
gparquet_writer_properties_set_data_page_size
                               (GParquetWriterProperties *properties,
                                gint64 data_page_size);

Parameters

properties

A GParquetWriterProperties.

 

data_page_size

The data page size.

 

Since: 0.17.0


gparquet_writer_properties_get_data_page_size ()

gint64
gparquet_writer_properties_get_data_page_size
                               (GParquetWriterProperties *properties);

Parameters

properties

A GParquetWriterProperties.

 

Returns

The data page size.

Since: 0.17.0


gparquet_arrow_file_writer_new_arrow ()

GParquetArrowFileWriter *
gparquet_arrow_file_writer_new_arrow (GArrowSchema *schema,
                                      GArrowOutputStream *sink,
                                      GParquetWriterProperties *writer_properties,
                                      GError **error);

Parameters

schema

Arrow schema for written data.

 

sink

Arrow output stream to be written.

 

writer_properties

A GParquetWriterProperties.

[nullable]

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

A newly created GParquetArrowFileWriter.

[nullable]

Since: 0.11.0


gparquet_arrow_file_writer_new_path ()

GParquetArrowFileWriter *
gparquet_arrow_file_writer_new_path (GArrowSchema *schema,
                                     const gchar *path,
                                     GParquetWriterProperties *writer_properties,
                                     GError **error);

Parameters

schema

Arrow schema for written data.

 

path

Path to be read.

 

writer_properties

A GParquetWriterProperties.

[nullable]

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

A newly created GParquetArrowFileWriter.

[nullable]

Since: 0.11.0


gparquet_arrow_file_writer_write_table ()

gboolean
gparquet_arrow_file_writer_write_table
                               (GParquetArrowFileWriter *writer,
                                GArrowTable *table,
                                guint64 chunk_size,
                                GError **error);

Parameters

writer

A GParquetArrowFileWriter.

 

table

A table to be written.

 

chunk_size

The max number of rows in a row group.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since: 0.11.0


gparquet_arrow_file_writer_close ()

gboolean
gparquet_arrow_file_writer_close (GParquetArrowFileWriter *writer,
                                  GError **error);

Parameters

writer

A GParquetArrowFileWriter.

 

error

Return locatipcn for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since: 0.11.0

Types and Values

GPARQUET_TYPE_WRITER_PROPERTIES

#define             GPARQUET_TYPE_WRITER_PROPERTIES

struct GParquetWriterPropertiesClass

struct GParquetWriterPropertiesClass {
  GObjectClass parent_class;
};

GPARQUET_TYPE_ARROW_FILE_WRITER

#define GPARQUET_TYPE_ARROW_FILE_WRITER (gparquet_arrow_file_writer_get_type())

struct GParquetArrowFileWriterClass

struct GParquetArrowFileWriterClass {
  GObjectClass parent_class;
};

GParquetArrowFileWriter

typedef struct _GParquetArrowFileWriter GParquetArrowFileWriter;

GParquetWriterProperties

typedef struct _GParquetWriterProperties GParquetWriterProperties;

Property Details

The “arrow-file-writer” property

  “arrow-file-writer”        gpointer

The raw std::shared<parquet::arrow::FileWriter> *.

Owner: GParquetArrowFileWriter

Flags: Write / Construct Only