csvql

query CSVs in memory. with ansi sql

Pure Nim score 18/100 · last commit 2019-12-13 · 17 stars · tests present · no docs generated

Summary

Latest Version Unknown
License Unknown
CI Status Passing
Stars 17
Forks 3
Open Issues 0
Last Commit 2019-12-13
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install csvql
choosenim install csvql
git clone https://github.com/Bennyelg/csvql

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
csvql - - - - - - -

Source

Repository https://github.com/Bennyelg/csvql
Homepage https://github.com/Bennyelg/csvql
Registry Source github

README

CSVql - Nim

Query You'r CSVs data like a boss.

  Options(opt-arg sep :|=|spc):
  -h, --help                               write this help to stdout
  -q=, --query=       string     REQUIRED  Placing the query as an ANSI-SQL the table name should be replaced with the path
  to the csv instead
  i.e:
  1) SELECT name, day, hour FROM '/path/to/csv/test.csv' as
  t1 LIMIT 10
  2) SELECT name, lastname, birthday FROM '/path/to/csv/test.csv' as
  t1 LEFT JOIN '/path/to/csv/test2.csv' as t2 ON t1.name = t2.name
  • Delimiter are gussed so no need to specified.

Query over CSV with simple AnsiSQL.

Limitations:

1. Header must be present.

If you'r header is with spaces / special chars they will be replaced.
Space will replace to (dash _) and special chars will be removed.
# char will be written as no (# of drivers -> no_of_drivers)

2. Delimiter is guessed in app so the delimiters are limited to the following:

const possibleDelimiters = @[";", ",", ":", "~", "*", "$", "#", "@", "/", "%", "^", "\t"]

Please make sure its one of the following delimiters.

3. Fit to memory.

As you may already know - sqlite is used to store your data in-memory. so the CSV/s should be fit.

4. SQLite should be installed.

TODOs:

  1. Tests.