Skip to main content

Terminal based SQL client for local data

Project description

LoQL

screenshot

LoQL is a command line sql client for individual data files, allowing these to be queried (even joined) and viewed. It natively supports CSV, parquet and other formats.

Data Formats

The following file types can be opened as views in LoQL:

  • csv
  • parquet(.gz)
  • json(l)
  • xls(x)
  • clipboard
  • ...

Usage

This package can be installed with:

pipx install loql

and executed via:

loql

Arguments

If a filename is supplied as an argument to LoQL then it will open the data file as a view.

If a directory is supplied then the open file view will start in that location.

For example:

loql data/iris.csv

The contents of the clipboard can be converted into a view (e.g. after copying from Google Sheets), using the --clipboard argument:

loql --clipboard

Advanced Usage

New views can be created from an opened file. For example if iris.csv was opened as the view iris, then we could create a new view:

create view iris_variety as (
    select
        variety,
        avg("petal.length") as avg_petal_length
    from iris
    group by variety
)

create view

Views can be joined together, for example:

select * from iris natural join iris_variety

join

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loql-1.0.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

loql-1.0.0-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page