{"id":41275,"library":"hyparquet-writer","title":"hyparquet-writer","description":"Hyparquet Writer is a JavaScript library for writing Apache Parquet files, focused on being lightweight and fast. Current stable version is 0.15.6, with active development on GitHub under the hyparam organization. It is a companion to the hyparquet reader library. Key differentiators: pure JavaScript with no native dependencies, supports a wide range of Parquet logical types (STRING, JSON, TIMESTAMP, UUID, FLOAT16, GEOMETRY, etc.), automatic type inference, and optional SNAPPY compression. It outputs Parquet files compatible with the Parquet specification.","status":"active","version":"0.15.6","language":"javascript","source_language":"en","source_url":"https://github.com/hyparam/hyparquet-writer","tags":["javascript","ai","data","datalake","dataset","hyperparam","hyparquet","llm","ml","typescript"],"install":[{"cmd":"npm install hyparquet-writer","lang":"bash","label":"npm"},{"cmd":"yarn add hyparquet-writer","lang":"bash","label":"yarn"},{"cmd":"pnpm add hyparquet-writer","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"SNAPPY compression codec (included as dependency)","package":"snappyjs","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require() will fail unless using dynamic import()","wrong":"const { parquetWriteBuffer } = require('hyparquet-writer')","symbol":"parquetWriteBuffer","correct":"import { parquetWriteBuffer } from 'hyparquet-writer'"},{"note":"Only top-level exports are supported; don't use subpath imports","wrong":"import { parquetWriteFile } from 'hyparquet-writer/src'","symbol":"parquetWriteFile","correct":"import { parquetWriteFile } from 'hyparquet-writer'"},{"note":"TypeScript type; can be imported even if not used at runtime","wrong":null,"symbol":"ParquetWriteOptions","correct":"import { ParquetWriteOptions } from 'hyparquet-writer'"}],"quickstart":{"code":"import { parquetWriteBuffer } from 'hyparquet-writer';\n\n// Create an ArrayBuffer containing a Parquet file with two columns\nconst arrayBuffer = parquetWriteBuffer({\n  columnData: [\n    { name: 'name', data: ['Alice', 'Bob', 'Charlie'], type: 'STRING' },\n    { name: 'age', data: [25, 30, 35], type: 'INT32' },\n  ],\n});\n\n// The buffer can be written to disk or sent over the network\nconst uint8Array = new Uint8Array(arrayBuffer);","lang":"typescript","description":"Demonstrates writing a Parquet file to an ArrayBuffer with two typed columns using parquetWriteBuffer."},"warnings":[{"fix":"Use named imports: import { parquetWriteBuffer } from 'hyparquet-writer' instead of import parquetWriteBuffer from 'hyparquet-writer'.","message":"In version 0.15.0, the API changed from exporting a default function to named exports. Previously you could import parquetWriteBuffer as default.","severity":"breaking","affected_versions":"<0.15.0"},{"fix":"Use import or dynamic import: const { parquetWriteBuffer } = await import('hyparquet-writer')","message":"The package is ESM-only and cannot be require()'d directly. Attempting const { parquetWriteBuffer } = require('hyparquet-writer') throws an error.","severity":"gotcha","affected_versions":">=0.15.0"},{"fix":"Specify the 'type' property for each column in columnData. Supported types: BOOLEAN, INT32, INT64, FLOAT, DOUBLE, BYTE_ARRAY, STRING, JSON, TIMESTAMP, UUID, FLOAT16, GEOMETRY, GEOGRAPHY, VARIANT.","message":"Type inference may guess wrong types if data contains mixed types or is empty. Always provide explicit type to avoid runtime errors.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Remove the 'version' option from ParquetWriteOptions.","message":"The 'version' option in ParquetWriteOptions is deprecated and may be removed in future versions.","severity":"deprecated","affected_versions":">=0.14.0"}],"env_vars":null,"search_vec":"'0.15.6':25 'activ':27 'ai':84 'apach':12 'automat':67 'companion':38 'compat':78 'compress':73 'current':21 'data':85 'datalak':86 'dataset':87 'depend':51 'develop':28 'differenti':45 'etc':66 'fast':20 'file':14,77 'float16':64 'focus':15 'geometri':65 'github':30 'hyparam':33 'hyparquet':2,4,41,89 'hyparquet-writ':1 'hyperparam':88 'infer':69 'javascript':8,47,83 'json':61 'key':44 'librari':9,43 'lightweight':18 'llm':90 'logic':58 'ml':91 'nativ':50 'option':71 'organ':34 'output':75 'parquet':13,57,76,81 'pure':46 'rang':55 'reader':42 'snappi':72 'specif':82 'stabl':22 'string':60 'support':52 'timestamp':62 'type':59,68 'typescript':92 'uuid':63 'version':23 'wide':54 'write':11 'writer':3,5","created_at":"2026-06-04T18:51:36.886124+00:00","updated_at":"2026-06-04T18:51:36.886124+00:00","problems":[{"fix":"Use a named import: import { parquetWriteBuffer } from 'hyparquet-writer'","cause":"Incorrect default import when using an older version or outdated examples.","error":"TypeError: hyparquet_writer_1.default is not a function"},{"fix":"Use dynamic import: const { parquetWriteBuffer } = await import('hyparquet-writer')","cause":"Using CommonJS require() on an ESM package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Ensure data type matches the specified or inferred type. Use JSON.stringify for JSON columns.","cause":"Passing data that cannot be serialized to the given type (e.g., string in INT32 column).","error":"RangeError: Invalid typed array length"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://hyperparam.app","github":"https://github.com/hyparam/hyparquet-writer","docs":null,"changelog":null,"pypi":null,"npm":"hyparquet-writer","openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}