Live data from Hacker News

DuckDB: Querying JSON files as if they were tables

duckdb.org

61–70 of 81 posts

Re: DuckDB: Querying JSON files as if they were tables

#62

Earlier quoted context omitted.

Polars is a dataframe library, no? That's a quite different use-case.

oh no.. it does lazy query optimization, out of core... most if not all of the good stuff.

It's not a CLI SQL engine though, is it?

Re: DuckDB: Querying JSON files as if they were tables

#67
post #66

If you ever need to join two large dataframes, but are OOMing on the join, write them to disk as parquet files then use DuckDB to do the join. It's amazing what you can do on one machine thanks to DuckDB.

This isn't unique to duckdb. Almost all databases allow for sorting and joins of large tables that don't fit into memory.

Re: DuckDB: Querying JSON files as if they were tables

#68
post #23

Very nice! Does anyone know if we can query duckdb with a pandas dialect?

Hey, I maintain a tool called siuba that converts pandas methods to SQL, including for duckdb!

* duckdb example: https://siuba.org/guide/workflows-backends.html#duckdb

* supported methods: https://siuba.org/guide/ops-support-table.html

Re: DuckDB: Querying JSON files as if they were tables

#69

Earlier quoted context omitted.

Tried to open DuckDB file with one table with 890K rows and about 30 columns. Process stalled, had to kill it (MacOS). DuckDB cli opens it in a snap.

:( Thanks for trying. The only thing I can think is perhaps a version conflict (requires 0.70) but I would have expected it to say, rather than freeze. I will try to recreate the problem. Thanks.

Yes, I think I have 0.60, good point. I'll update the version and try again later.

Re: DuckDB: Querying JSON files as if they were tables

#70
post #59

Ah I was looking for exactly this the other day. I'm try to build a git based interface to our BI tool so that we can get config for our reports in source control instead of configuration in a db. Was looking for something to read json files which will house the config via SQL, i.e. a human readable db as an alternative to what the BI tool is using for it's config persistence. Will give DuckDB a go, thanks for postin…

Are you talking about metabase by any chance?
Post reply on HN