SQL – Paolo Redaelli https://monodes.com/predaelli A civil engineer with a longlife fondness for Software Libero Sun, 24 Mar 2024 17:43:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 91795679 DuckDB as the New jq https://monodes.com/predaelli/2024/03/24/duckdb-as-the-new-jq/ https://monodes.com/predaelli/2024/03/24/duckdb-as-the-new-jq/#respond Sun, 24 Mar 2024 17:43:09 +0000 https://monodes.com/predaelli/?p=11513

Recently, I’ve been interested in the DuckDB project (like a SQLite geared towards data applications). And one of the amazing features is that it has many data importers included without requiring extra dependencies. This means it can natively read and parse JSON as a database table, among many other formats.

I work extensively with JSON day to day, and I often reach for jq when exploring documents. I love jq, but I find it hard to use. The syntax is super powerful, but I have to study the docs anytime I want to do anything beyond just selecting fields.

Once I learned DuckDB could read JSON files directly into memory, I realized that I could use it for many of the things where I’m currently using jq. In contrast to the complicated and custom jq syntax, I’m very familiar with SQL and use it almost daily.

Source: DuckDB as the New jq

]]>
https://monodes.com/predaelli/2024/03/24/duckdb-as-the-new-jq/feed/ 0 11513
Upsert in SQL https://monodes.com/predaelli/2023/09/26/upsert-in-sql/ https://monodes.com/predaelli/2023/09/26/upsert-in-sql/#respond Tue, 26 Sep 2023 20:11:30 +0000 https://monodes.com/predaelli/?p=10822

Inserting and updating data with a single query.

Source: Upsert in SQL ]]>
https://monodes.com/predaelli/2023/09/26/upsert-in-sql/feed/ 0 10822