multiprocessio / dsq

Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't query data from a nested json

guolaopi opened this issue · comments

图片
It's tips "no such a column"

Oh you're right. You need to escape the quotes with backslashes if you are using PowerShell.

> dsq .\testdata\nested\nested.json 'select name, \"location.city\" from {}'
[{"location.city":"Toronto","name":"Agarrah"},
{"location.city":"Mexico City","name":"Minoara"},
{"location.city":"New London","name":"Fontoon"}]

I'll update the docs to note this.

I don't know PowerShell that well so there may be another way. Open to suggestions.

图片
It works thank you.
Cmd has the same problem.

Good point, thank you! I'll include powershell and cmd in the docs update.