]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/ruby/red-parquet/README.md
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / ruby / red-parquet / README.md
1 <!---
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -->
19
20 # Red Parquet - Apache Parquet Ruby
21
22 Red Parquet is the Ruby bindings of Apache Parquet. Red Parquet is based on GObject Introspection.
23
24 [Apache Parquet](https://parquet.apache.org/) is a columnar storage format.
25
26 [GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection) is a middleware for language bindings of C library. GObject Introspection can generate language bindings automatically at runtime.
27
28 Red Parquet uses [Apache Parquet GLib](https://github.com/apache/arrow/tree/master/c_glib/parquet-glib) and [gobject-introspection gem](https://rubygems.org/gems/gobject-introspection) to generate Ruby bindings of Apache Parquet.
29
30 Apache Parquet GLib is a C wrapper for [Apache Parquet C++](https://github.com/apache/arrow/tree/master/cpp/src/parquet). GObject Introspection can't use Apache Parquet C++ directly. Apache Parquet GLib is a bridge between Apache Parquet C++ and GObject Introspection.
31
32 gobject-introspection gem is a Ruby bindings of GObject Introspection. Red Parquet uses GObject Introspection via gobject-introspection gem.
33
34 ## Install
35
36 Install Apache Parquet GLib before install Red Parquet. See [Apache Arrow install document](https://arrow.apache.org/install/) for details.
37
38 Install Red Parquet after you install Apache Parquet GLib:
39
40 ```text
41 % gem install red-parquet
42 ```
43
44 ## Usage
45
46 ```ruby
47 require "parquet"
48
49 table = Arrow::Table.load("/dev/shm/data.parquet")
50 # Process data in table
51 table.save("/dev/shm/data-processed.parquet")
52 ```