Working with Intervals in DuckDB

Time-based operations are a fundamental aspect of data analysis and manipulation. DuckDB, the in-process analytical database management system, provides robust support for handling time-based operations through its INTERVAL data type.

This article explores the capabilities, syntax, and practical applications of intervals in DuckDB.

Read more

Fix “Out of Range Error” When Using GENERATE_SUBSCRIPTS() in DuckDB

If you’re getting an “Out of Range Error” when using the generate_subscripts() function in DuckDB, it could be that you’re specifying a non-existent dimension for the array.

DuckDB’s generate_subscripts() function accepts the array as the first argument, and the dimension as the second argument. The second argument must correspond to an actual dimension present in the array.

To fix this issue, be sure to specify a dimension that actually exists in the array.

Read more

DuckDB Now Ships With a Web User Interface

DuckDB has enhanced its user experience with the introduction of a new web-based user interface in the v1.2.1 release. This addition brings graphical interaction capabilities to the analytical database system, making it more accessible to users who prefer visual interfaces over command-line operations.

Read more

Unnesting Lists & Structs with DuckDB’s UNNEST() Function

DuckDB has an unnest() function that we can use to unnest lists and structs. Well, it can also be applied to NULL, but that’ll return an empty result.

By “unnest” I mean it takes the list or struct, and it returns its contents as rows in a table. You might say that it converts lists and structs into tables, where each item in the list or struct becomes a row in the table.

Below are examples of using DuckDB’s unnest() function to unnest lists and structs.

Read more