5 ms·
Trying chDB, an embeddable ClickHouse engine
- jfim 3y agoThat's pretty cool, I wonder how it compares to DuckDB
- nalgeon 3y agoIn terms of SQL syntax supported, you can compare them here[1]. As for performance, it probably comes down to "clickhouse-local vs. DuckDB", and there was an interesting post about this some time ago[2]. [1]: https://codapi.org/sql https://codapi.org/sql [2]: https://www.vantage.sh/blog/clickhouse-local-vs-duckdb https://www.vantage.sh/blog/clickhouse-local-vs-duckdb
- Double_a_92 3y ago[flagged]
- martijnvds 3y agoIs it related to Clickjacking?
- jacobwg 3y agoClickHouse is a popular open-source analytics database (https://github.com/ClickHouse/ClickHouse https://github.com/ClickHouse/ClickHouse), so in this case they are assuming you know what ClickHouse is yes.
- gavinray 3y agoThere are like, 10 common databases and I would put Clickhouse up there right under the classics like MySQL/Postgres/Oracle/MS-SQL.
- deleted 3y ago[deleted]
- nasretdinov 3y agoI'd argue we probably want to have more embedded full-fledged DBs. SQLite and DuckDB are great choice while your project is small, but when you need to scale up you'd have to migrate to another DB and/or create a lot of workarounds. With prohects like ChDB you have a distributed OLAP engine already, all it takes to migrate is to rsync a bunch of files to the ClickHouse cluster, ATTACH TABLEs, and you're done.
- nasretdinov 3y agoI also really like how seamless is UDF integration. The way UDFs work in ClickHouse is you create a separate binary that can accept the input for the UDF via stdin and produce an output to stdout, so it's quite flexible, but also a pain to set up. This library does all this plumbing seamlessly for you, which is super nice.
- qxip 3y agoThat's right! Under the hood we're doing the same thing when a UDF function is created so its still language agnostic, but for python it offers much nicer and needed wrapper - designed for actual users and not for showcase. If this will translate just as well to other chdb bindings (go, rust, node, bun, etc) allowing them to attach native functions, UDF might become a major force for chdb adoption.
- rnk 3y agoThe embedded db is cool, but what's the security boundary around UDFs? I figure running "standard" SQL is safe, because it's just some functions implemented in the database (SPJ). It's not malware (maybe only slow ;-)). But UDFs that could be python or worse risk a binary are more of an open ended danger.
- nasretdinov 3y agoI think in this case as it's an embedded database the security of the DB equals the security of the app, so no issues here. In stabdalone ClickHouse users can't define UDFs themselves, they need to be installed on the server.
- owlstuffing 3y agoA JDBC driver would be nice.
- whalesalad 3y agoWould love to see some info in docs re: concurrent access. Single writer multi reader? Multi writer? Has anyone tried this out and can comment on Python usage with threading?
- amluto 3y ago@chdb_udf() def split_part(s, sep, idx): idx = int(idx)-1 return s.split(sep)[idx] second = chdb.query("select split_part('a;b;c', ';', 2)") Is there some reason that registration of a UDF deserves to be global?
- edublancas 3y agoThe chDB team is great! We worked with them recently to add chDB support to JupyterLab via a %%sql magic: https://jupysql.ploomber.io/en/latest/integrations/chdb.html https://jupysql.ploomber.io/en/latest/integrations/chdb.html
- Reubend 3y agoCould somebody help me understand the usecase for this? Is it mainly for people who prefer to analyze data with SQL rather than something like Pandas?