DuckDB dynamic column selection gets even better
HTML-код
- Опубликовано: 4 фев 2025
- In this video, we're going to learn about dynamic column selection in DuckDB using the COLUMNS clause. It's been possible to do this for quite some time, but the recent release of DuckDB 1.1 made this functionality even more useful.
We'll start off with an introduction to the COLUMNS clause, showing how to return columns based on a regular expression. We'll then see how to exclude the columns returned by using the lambda functionality of the COLUMNS clause, combined with a list of field names stored in a variable.
We'll see how to only return columns of a specific data type, again with help from the variables feature. We'll also see how you can filter the results of a query where the value in every column must be greater than a certain value.
Finally we'll learn how to use the new splat operator that lets us find the maximum value in any of the columns for a given row.
🟡 Blog - www.markhneedh...
🟡 Columns clause - duckdb.org/doc...
🟡 DuckDB 1.1 release - duckdb.org/202...
🟡 Kaggle FIFA dataset - www.kaggle.com...
DuckDB looks really interesting. I don't really know it well at this point; I will check out your other DuckDB videos
Nice work Mark, you are really so good at this. Any chance you can share the scripts that you demoed?
Hey, Thanks! And sorry I should have said in the video that all the code is in the blog post linked in the description. Link is below too:
www.markhneedham.com/blog/2024/09/22/duckdb-dynamic-column-selection/