Live data from Hacker News

Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

github.com

51–60 of 64 posts

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#51
post #24

This is cool...Totally reminded me about several tools pop up on HN every now and then in the past for similar task so i did a quick search: clickhouse-local - https://news.ycombinator.com/item?id=22457767 q - https://news.ycombinator.com/item?id=27423276 textql - https://news.ycombinator.com/item?id=16781294 simpql- https://news.ycombinator.com/item?id=25791207 We need a benchmark i think..;)

Groupby and joins are a good test. You could also give Duckdb cli api a try (it is column based)

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#52
post #50
post #48

Earlier quoted context omitted.

I am currently evaluating dsq and its partner desktop app DataStation. AIUI, the developer of DataStation realised that it would be useful to extract the underlying pieces into a standalone CLI, so they both support the same range of sources. dsq CLI - https://github.com/multiprocessio/dsq DataStation desktop app - https://datastation.multiprocess.io/ Two alternative CLI tools that I looked at: sq - https://sq.io/ oc…

xsv is invaluable for processing big csv files: https://github.com/BurntSushi/xsv

qsv is a fork of this, as qsv is pretty much unmaintained now (I don't mean to sound negative, BurntSushi did an AMAZING job and I love the work they did).

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#53

I have a use case, where my company's application logs will be shipped to S3 in a directory structure such as application/timestamp(one_hour)_logs.parquet. We want to build a simple developer focussed UI, where we can query for a given application for a time range and retrieve a bunch of s3 blobs in that time range and brute force search for the desired string. I see that roapi offers a REST interface for a fixed set…

Trino can do this.

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#54
post #24

This is cool...Totally reminded me about several tools pop up on HN every now and then in the past for similar task so i did a quick search: clickhouse-local - https://news.ycombinator.com/item?id=22457767 q - https://news.ycombinator.com/item?id=27423276 textql - https://news.ycombinator.com/item?id=16781294 simpql- https://news.ycombinator.com/item?id=25791207 We need a benchmark i think..;)

[deleted]

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#55
post #24

This is cool...Totally reminded me about several tools pop up on HN every now and then in the past for similar task so i did a quick search: clickhouse-local - https://news.ycombinator.com/item?id=22457767 q - https://news.ycombinator.com/item?id=27423276 textql - https://news.ycombinator.com/item?id=16781294 simpql- https://news.ycombinator.com/item?id=25791207 We need a benchmark i think..;)

I'll save you the trouble, ClickHouse will come up on top by a mile and is the only one listed that supports clustering and spill to disk.

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#56

I have a use case, where my company's application logs will be shipped to S3 in a directory structure such as application/timestamp(one_hour)_logs.parquet. We want to build a simple developer focussed UI, where we can query for a given application for a time range and retrieve a bunch of s3 blobs in that time range and brute force search for the desired string. I see that roapi offers a REST interface for a fixed set…

If you're already using parquet, it might be worth looking at the concept of datasets e.g. https://arrow.apache.org/docs/python/generated/pyarrow.parqu...

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#57

I have a use case, where my company's application logs will be shipped to S3 in a directory structure such as application/timestamp(one_hour)_logs.parquet. We want to build a simple developer focussed UI, where we can query for a given application for a time range and retrieve a bunch of s3 blobs in that time range and brute force search for the desired string. I see that roapi offers a REST interface for a fixed set…

Amazon Athena + AWS Glue for schema discovery can do this.

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#58
post #6

AWS Athena offers something similar. You can build tables off of structured text files (like log files) in S3 and run SQL queries.

What’s the performance like though?

Response in seconds if you hit partitions (a version of index that only support equality and its implemented in folders in this case) and your storage system contains content metadata like parquet or orc.

Is not a BI tool tho, if queries have high variability on the where clause and you can't leverage indexes then you're looking at minutes as response time.

If the data is not in structures but plain csv/json, all bets are off.

I've not yet tested it at terabyte scale albeit it should happily scale up there.

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#59
post #2

This looks really cool! Especially using datafusion underneath means that it probably is blazingly fast. If you like this, I recommend taking a look at OctoSQL[0], which I'm the author of. It's plenty fast and easier to add new data sources for as external plugins. It can also handle endless streams of data natively, so you can do running groupings on i.e. tailed JSON logs. Additionally, it's able to push down predic…

Ok, I have now actually benchmarked this roapi CLI on the Amazon Review Dataset and it's over 20x slower than OctoSQL.

A simple group by

  time columnq sql --table books_10m.ndjson "SELECT AVG(overall) FROM books_10m"
takes 66 seconds.

The equivalent in OctoSQL takes less than 3 seconds.

I retract my statement about this project being blazingly fast, though I imagine it's just the JSON parser that requires optimization.

Re: Run SQL on CSV, Parquet, JSON, Arrow, Unix Pipes and Google Sheet

#60
post #52
post #50

Earlier quoted context omitted.

xsv is invaluable for processing big csv files: https://github.com/BurntSushi/xsv

qsv is a fork of this, as qsv is pretty much unmaintained now (I don't mean to sound negative, BurntSushi did an AMAZING job and I love the work they did).

Didn't know that. Thanks!
Post reply on HN