All Projects → cldellow → Sqlite Parquet Vtable

cldellow / Sqlite Parquet Vtable

Licence: apache-2.0
A SQLite vtable extension to read Parquet files

Projects that are alternatives of or similar to Sqlite Parquet Vtable

Fluent Sqlite Driver
Fluent driver for SQLite
Stars: ✭ 51 (-69.46%)
Mutual labels:  sqlite, sqlite3
D2sqlite3
A small wrapper around SQLite for the D programming language
Stars: ✭ 67 (-59.88%)
Mutual labels:  sqlite, sqlite3
Esp32 Idf Sqlite3
Sqlite library for esp-idf (esp32) framework
Stars: ✭ 57 (-65.87%)
Mutual labels:  sqlite, sqlite3
Sqlite Global Tool
SQLite .NET Core CLI tool that allows the user to manually enter and execute SQL statements with or without showing query result.
Stars: ✭ 37 (-77.84%)
Mutual labels:  sqlite, sqlite3
Genomicsqlite
Genomics Extension for SQLite
Stars: ✭ 90 (-46.11%)
Mutual labels:  sqlite, sqlite3
Sqlitelib
Easily build a custom SQLite static library for use in macOS and iOS frameworks and apps.
Stars: ✭ 38 (-77.25%)
Mutual labels:  sqlite, sqlite3
Sqlite orm
❤️ SQLite ORM light header only library for modern C++
Stars: ✭ 1,121 (+571.26%)
Mutual labels:  sqlite, sqlite3
Denodb
MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Stars: ✭ 498 (+198.2%)
Mutual labels:  sqlite, sqlite3
Electrocrud
Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
Stars: ✭ 1,267 (+658.68%)
Mutual labels:  sqlite, sqlite3
Electron With Sqlite3
Sample application for ElectronJS working with Sqlite3
Stars: ✭ 83 (-50.3%)
Mutual labels:  sqlite, sqlite3
Android dbinspector
Android library for viewing and sharing in app databases.
Stars: ✭ 881 (+427.54%)
Mutual labels:  sqlite, sqlite3
Sqhell.vim
An SQL wrapper for vim
Stars: ✭ 113 (-32.34%)
Mutual labels:  sqlite, sqlite3
Vscode Sqltools
Database management for VSCode
Stars: ✭ 741 (+343.71%)
Mutual labels:  sqlite, sqlite3
Perfect Sqlite
A stand-alone Swift wrapper around the SQLite 3 client library.
Stars: ✭ 42 (-74.85%)
Mutual labels:  sqlite, sqlite3
Tuql
Automatically create a GraphQL server from a SQLite database or a SQL file
Stars: ✭ 526 (+214.97%)
Mutual labels:  sqlite, sqlite3
Electron Angular4 Sqlite3
Sample project to show how to build a desktop app using Electron, Angular 4 and Sqlite3
Stars: ✭ 60 (-64.07%)
Mutual labels:  sqlite, sqlite3
Walkable
A Clojure(script) SQL library for building APIs: Datomic® (GraphQL-ish) pull syntax, data driven configuration, dynamic filtering with relations in mind
Stars: ✭ 384 (+129.94%)
Mutual labels:  sqlite, sqlite3
Aiosqlite
asyncio bridge to the standard sqlite3 module
Stars: ✭ 411 (+146.11%)
Mutual labels:  sqlite, sqlite3
Liszt
A personal organization software with a script engine for automation
Stars: ✭ 72 (-56.89%)
Mutual labels:  sqlite, sqlite3
Sqlite3 Encryption
The easiest way to build SQLite3 with encryption support on Windows. Compilation of DLL, SLL or shell is now a matter of minutes
Stars: ✭ 102 (-38.92%)
Mutual labels:  sqlite, sqlite3

sqlite-parquet-vtable

Build Status codecov

A SQLite virtual table extension to expose Parquet files as SQL tables. You may also find csv2parquet useful.

This blog post provides some context on why you might use this.

Installing

Download

You can fetch a version built for Ubuntu 16.04 at https://s3.amazonaws.com/cldellow/public/libparquet/libparquet.so.xz

Building

./make-linux

The first run will git clone a bunch of libraries, patch them to be statically linkable and build them.

Subsequent builds will only build the parquet virtual table extension.

Building (release)

Run ./make-linux-pgo to build an instrumented binary, run tests to collect real-life usage samples, then build an optimized binary. PGO seems to give a 5-10% reduction in query times.

Tests

Run:

tests/create-queries-from-templates
tests/test-all

Use

$ sqlite/sqlite3
sqlite> .load build/linux/libparquet
sqlite> CREATE VIRTUAL TABLE demo USING parquet('parquet-generator/99-rows-1.parquet');
sqlite> SELECT * FROM demo;
...if all goes well, you'll see data here!...

Note: if you get an error like:

sqlite> .load build/linux/libparquet
Error: parquet/libparquet.so: wrong ELF class: ELFCLASS64

You have the 32-bit SQLite installed. To fix this, do:

sudo apt-get remove --purge sqlite3
sudo apt-get install sqlite3:amd64

Supported features

Row group filtering

Row group filtering is supported for strings and numerics so long as the SQLite type matches the Parquet type.

e.g. if you have a column foo that is an INT32, this query will skip row groups whose statistics prove that it does not contain relevant rows:

SELECT * FROM tbl WHERE foo = 123;

but this query will devolve to a table scan:

SELECT * FROM tbl WHERE foo = '123';

This is laziness on my part and could be fixed without too much effort.

Row filtering

For common constraints, the row is checked to see if it satisfies the query's constraints before returning control to SQLite's virtual machine. This minimizes the number of allocations performed when many rows are filtered out by the user's criteria.

Memoized slices

Individual clauses are mapped to the row groups they match.

eg going on row group statistics, which store minimum and maximum values, a clause like WHERE city = 'Dawson Creek' may match 80% of row groups.

In reality, it may only be present in one or two row groups.

This is recorded in a shadow table so future queries that contain that clause can read only the necessary row groups.

Types

These Parquet types are supported:

  • INT96 timestamps (exposed as milliseconds since the epoch)
  • INT8/INT16/INT32/INT64
  • UTF8 strings
  • BOOLEAN
  • FLOAT
  • DOUBLE
  • Variable- and fixed-length byte arrays

These are not currently supported:

  • UINT8/UINT16/UINT32/UINT64
  • DECIMAL
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].