# deejay-file-query

> A CLI tool that uses the deejay DSL to parse files

Latest version **1.3.1** (published 2025-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install deejay-file-query
pnpm add deejay-file-query
yarn add deejay-file-query
bun add deejay-file-query
```

Provides the command `deejay`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2025-11-01 |
| First published | 2021-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 30.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jesse Daniel Mitchell |
| Maintainers | totaltechgeek |

## Links

- npm: https://www.npmjs.com/package/deejay-file-query
- Repository: https://github.com/TotalTechGeek/deejay-file-query
- npm.io page: https://npm.io/package/deejay-file-query

## Dependencies (11)

- [avsc](https://npm.io/package/avsc.md) ^5.7.3
- [rxjs](https://npm.io/package/rxjs.md) ^7.5.4
- [fast-csv](https://npm.io/package/fast-csv.md) ^4.3.6
- [commander](https://npm.io/package/commander.md) ^8.3.0
- [node-xlsx](https://npm.io/package/node-xlsx.md) ^0.24.0
- [JSONStream](https://npm.io/package/JSONStream.md) ^1.3.5
- [stream-json](https://npm.io/package/stream-json.md) ^1.8.0
- [@datastream/csv](https://npm.io/package/@datastream/csv.md) ^0.0.35
- [@dsnp/parquetjs](https://npm.io/package/@dsnp/parquetjs.md) ^1.3.3
- [deejay-rxjs-dsl](https://npm.io/package/deejay-rxjs-dsl.md) ^4.0.9
- [fast-xml-parser](https://npm.io/package/fast-xml-parser.md) ^4.0.4

## Recent versions

- 1.3.1 (latest) — 2025-11-01
- 1.3.0 — 2025-09-28
- 1.2.2 — 2024-11-26
- 1.2.1 — 2024-08-29
- 1.2.0 — 2024-08-27
- 1.1.0 — 2024-05-03
- 1.0.35 — 2022-06-03
- 1.0.34 — 2022-06-03
- 1.0.33 — 2022-06-03
- 1.0.32 — 2022-04-12
- 1.0.31 — 2022-04-11
- 1.0.30 — 2022-03-24
- 1.0.29 — 2022-03-24
- 1.0.28 — 2022-03-24
- 1.0.27 — 2022-03-24
- … 29 more at https://npm.io/package/deejay-file-query/versions

## README

# Deejay File Query Tool

```txt
deejay --help
```

Produces

```txt
Usage: deejay [options]

A program written to allow you to use the deejay DSL on files to query out data.

Options:
  -V, --version            output the version number
  -f, --format <format>    The format of the file (choices: "json", "csv", "bigjson", "avro")
  -i, --input <file>       The file to be processed (default: "$")
  -c, --command <command>  The command to run (default: "")
  -o, --output <file>      Output file
  -x, --export <mode>      The output format (choices: "console", "json", "csv", "avro", default: "console")
  -a, --additional <info>  Additional information for the file parser
  -h, --help               display help for command

```

---

## Query Language

Additional documentation coming soon. Uses the query language from `deejay-rxjs-dsl`.

### Examples

```txt
deejay -i file.csv -c "average @.age"
```

Produces:

```txt
32.5
```

Complicated Query (getting counts of people who share a first name):

```txt
deejay -i file.json -c "mergeMap @.people; reduce groupBy($.accumulator, $.current, split($.name, ' ').0, $.accumulator+1, 0), {}; mergeMap toPairs(@); filter @.1 > 1; map ({ name: @.0, count: @.1 })" -x csv
```

```csv
name,count
Mike,3
Kevin,2
```

---
_Source: https://npm.io/package/deejay-file-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
