2 Getting started with DuckDB
This chapter covers
Now that we have an understanding of what DuckDB is and why it came into prominence in the early 2020s, it’s time to get familiar with it. This chapter will be centered on the DuckDB command-line interface (CLI). We’ll learn how to install it on various environments, before learning about the its built-in commands. We’ll conclude by querying a remote CSV file.
2.1 Supported environments
DuckDB is available for a range of different programming languages and operating systems (Linux, Windows, and macOS) both for Intel/AMD and ARM architectures. At the time of writing, there is support for the command line, Python, R, Java, JavaScript, Go, Rust, Node.js, Julia, C/C++, ODBC, JDBC, WASM, and Swift. In this chapter, we will focus on the DuckDB command line exclusively, as we think that is the easiest way to get you up to speed. The DuckDB CLI does not require a separate server installation, as DuckDB is an embedded database, and in the case of the CLI, it is embedded in the CLI executable.
The command-line tool is published to GitHub releases, and there are a variety of packages for different operating systems and architectures. You can find the full list on the installation page: https://duckdb.org/docs/installation/index.