hyparquet-writer/README.md

26 lines
995 B
Markdown
Raw Normal View History

2025-03-26 03:15:14 +00:00
# Hyparquet Writer
[![workflow status](https://github.com/hyparam/hyparquet-writer/actions/workflows/ci.yml/badge.svg)](https://github.com/hyparam/hyparquet-writer/actions)
2025-03-26 03:15:14 +00:00
[![mit license](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)
2025-03-26 05:36:06 +00:00
![coverage](https://img.shields.io/badge/Coverage-96-darkred)
[![dependencies](https://img.shields.io/badge/Dependencies-0-blueviolet)](https://www.npmjs.com/package/hyparquet?activeTab=dependencies)
2025-03-26 05:36:06 +00:00
## Usage
Call `parquetWrite` with a list of columns, each column is an object with a `name` and `data` field. The `data` field should be an array of same-type values.
2025-03-26 05:36:06 +00:00
```javascript
import { parquetWrite } from 'hyparquet-writer'
2025-03-26 05:36:06 +00:00
const arrayBuffer = parquetWrite([
{ name: 'name', data: ['Alice', 'Bob', 'Charlie'] },
{ name: 'age', data: [25, 30, 35] },
])
2025-03-26 05:36:06 +00:00
```
## References
- https://github.com/hyparam/hyparquet
- https://github.com/apache/parquet-format
- https://github.com/apache/parquet-testing