GithubHelp home page GithubHelp logo

json2parquet's Introduction

JSON to Parquet Converter (C++)

Description

This C++ program is a JSON to Parquet data converter designed to read JSON input from stdin and write Parquet output to stdout. It is built using CMake and requires Apache Arrow version 11 or higher for compilation. The tool efficiently transforms data from JSON format to Parquet while maintaining the data structure.

Usage

Prerequisites

  • CMake
  • Apache Arrow (version 11 or higher)

Build Instructions

mkdir build
cd build
cmake ..
make

Command Line Usage

cat input.json | ./json2parquet --schema-file schema.txt > output.parquet

Options

  1. Schema File: Provide a schema file (schema.txt) to specify column types. The schema file should list column names and their corresponding data types. Supported types include date, int32, and int64. If a column from the JSON is not present in the schema file, the type will be determined automatically.

    Example schema.txt:

    column1 int32
    column2 date
    column3 int64
    
    cat input.json | ./json2parquet --schema-file schema.txt > output.parquet
  2. Optimizations: Utilize options for optimizing the conversion process.

    cat input.json | ./json2parquet --compression snappy --max-row-group-length 100000 > output.parquet

Dependencies

  • CMake
  • Apache Arrow (version 11 or higher)

Contributions

If you have suggestions for improvement or encounter issues, feel free to create an issue or submit a pull request.

json2parquet's People

Contributors

resetius avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.