dsq is a commandline tool for running SQL queries against all the data file types that DataStation supports (JSON, CSV, Parquet, Excel, etc.). Here is a simple example:

$ cat users.csv
name,age
Jorge,30
Nina,32
Cal,28
Mona,27
$ dsq users.csv "SELECT * FROM {} ORDER BY CAST(age AS INT) DESC" | jq
[
  {
    "age": "32",
    "name": "Nina"
  },
  {
    "age": "30",
    "name": "Jorge"
  },
  {
    "age": "28",
    "name": "Cal"
  },
  {
    "age": "27",
    "name": "Mona"
  }
]

dsq uses DataStation libraries under-the-hood and DataStation in turn uses SQLite for these kinds of queries.

The dsq source code is available on Github.

continue reading on datastation.multiprocess.io

⚠️ This post links to an external website. ⚠️