How to Output Query Results as JSON in the DuckDB CLI

DuckDB is a lightweight, fast database management system designed for analytics and embedded use cases. Its versatility makes it an excellent choice for developers and data analysts.

One useful feature of DuckDB is the ability to output query results in different formats, such as JSON, directly from the command-line interface (CLI). By default, the DuckDB CLI uses the duckbox output mode for query results (which outputs the results in a table-like format), but we can change that.

In this article, we’ll walk through the steps to output query results as JSON when using the DuckDB CLI.

Continue reading

How to Change the Output Mode in the DuckDB CLI

DuckDB is a database management system tailored for analytical tasks. Its command line interface (CLI) provides a convenient way to interact with databases and execute queries. The CLI provides us with the ability to configure the output mode for query results, offering flexibility in how data is displayed or exported.

This article provides a quick overview of how to change the output mode in the DuckDB CLI.

Continue reading

5 Ways to Create a Database in DuckDB

DuckDB is a lightweight, high-performance database system designed for analytical workloads. As with any database management system (DBMS), one of the first things we normally want to do when we launch it is to create or open a database.

When it comes to creating a database, you can’t create a database in DuckDB by using the SQL CREATE DATABASE statement (unless you’re using a tool that allows you to do so). DuckDB works differently.

In this article, we look at various options for creating a database in DuckDB.

Continue reading

Getting Started with DuckDB Command Line Interface

DuckDB is a high-performance in-process analytical database management system, often referred to as the “SQLite for analytics.” Its Command Line Interface (CLI) is a useful tool for executing SQL queries, managing databases, and exploring DuckDB’s features.

This article provides a comprehensive guide to the basics of using DuckDB’s CLI, helping beginners and advanced users alike understand how to leverage it effectively.

Continue reading

What is DuckDB?

This article takes a look at DuckDB, a modern database management system (DBMS) designed specifically for data analysis and processing.

Often described as the “SQLite for analytics,” DuckDB is lightweight, embeddable, and highly efficient, making it a popular choice for those working with structured data.

Whether you’re considering DuckDB for your projects or simply curious about its capabilities, this article will give you a basic overview of what it is and how it fits into the data analytics landscape.

Continue reading