Alternative DuckDB query interfaces
While DuckDB’s primary interface is DuckDB SQL, this isn’t the only way you can compose DuckDB queries. In Chapter 8, we saw how the DuckDB Python client’s Relational API allows you to use a dataframe-like API to create relation objects, which can be composed through method chaining to effectively define complex DuckDB queries. In Chapter 9, we also saw how, when working in R, DuckDB supports executing queries composed with dplyr, through the composition of piped function calls. In this section, we’ll survey some notable query interfaces that can be used as alternatives to SQL for querying DuckDB.
One motivation for adopting an alternative query interface is that many data practitioners, especially those who work in Python and R, may prefer not to use SQL to define analytical queries. Furthermore, these query APIs are designed with analytical query patterns in mind and can often express certain types of analytical queries...