7 DuckDB in the cloud with MotherDuck

 

This chapter covers

  • The idea behind MotherDuck
  • Understanding how the architecture works under the hood
  • Use cases for serverless SQL analytics
  • Creating, managing, and sharing MotherDuck databases
  • Tips for optimizing your MotherDuck usage

Up until this point, our focus has been on using DuckDB’s capabilities for querying datasets—whether they’re stored locally or remotely—directly from our own computers. While this approach addresses a broad range of needs, there are specific scenarios in which a remote database server offers additional advantages.

Enter MotherDuck: a solution for enhancing SQL analytics through a simplified scale-up strategy. In this chapter, we will learn how MotherDuck enables hybrid query execution, making use of a remotely hosted DuckDB alongside one operating on our own machine.

7.1 Introduction to MotherDuck

MotherDuck (https://motherduck.com) is a collaborative serverless analytics platform that lets you query and analyze data in cloud databases and from cloud storage, using your browser or any of the DuckDB APIs. Serverless, in this context, means that you as a user won’t have to deal with spinning up servers, clusters, or configuring database instances. Instead, you can just create a database, and the service will take care of the rest for you.

7.1.1 How it works

7.1.2 Why use MotherDuck?

7.2 Getting started with MotherDuck

7.2.1 Using MotherDuck through the UI

7.2.2 Connecting to MotherDuck with DuckDB via token-based authentication

7.3 Making the best possible use of MotherDuck

7.3.1 Uploading databases to MotherDuck

7.3.2 Creating databases in MotherDuck

7.3.3 Sharing databases

7.3.4 Managing S3 secrets and loading Data from S3 buckets

7.3.5 Optimizing data ingestion and MotherDuck usage

7.3.6 Querying your data with AI

7.3.7 Integrations

Summary