Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csv-query-stream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-query-stream

Query large compressed CSV documents using NodeJS streams.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

csv-query-stream

Query large compressed CSV documents using NodeJS streams.

Use Case

$ npm install csv-query-stream

In mission critical applications, sometimes even the extra head space of SQLite indices can be too much. In that case, data can be saved directly to text files and queried with this module, while at the same time being inside a Zip archive and never get unpacked.

This module uses two stream to achieve this:

  1. a stream to read the Zip file and seek to the CSV file's position in it
  2. a stream to read the CSV file and query inside it

Usage of streams allows low memory overhead and fast processing.

Data Format

The following assumptions are made about your data when using this module:

  • Your data is in CSV or TSV file(s)
  • Every row of data is unique in its own file
  • Your data file(s) are inside a Zip archive at the root level
  • Every row of data is monotonic, meaning row's ID is its line number minus 1
  • First row of data is a header row

Sample data is checked in under the test/ directory.
API usage is pretty straightforward. See test/ for examples.

Keywords

FAQs

Package last updated on 24 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc