Skip to main content

Replicating Flat Files to MotherDuck

The goal of this guide is to show users simple examples of loading data from flat file sources into MotherDuck. Examples are shown for both the MotherDuck Web UI and the DuckDB CLI. To install the DuckDB CLI, check out the instructions first.

CSV

From the UI, follow these steps:

  1. Navigate to the Add Data section.
  2. Select the file. This file will be uploaded into your browser so that it can be queried by DuckDB.
  3. Execute the generated query which will create a table for you.
    1. Modify the query as needed to suit the correct Database / Schema / Table name.

JSON

From the UI, follow these steps:

  1. Navigate to the Add Data section.
  2. Select the file. This file will be uploaded into your browser so that it can be queried by DuckDB.
  3. Execute the generated query which will create a table for you.
    1. Modify the query as needed to suit the correct Database / Schema / Table name.

Parquet

From the UI, follow these steps:

  1. Navigate to the Add Data section.
  2. Select the file. This file will be uploaded into your browser so that it can be queried by DuckDB.
  3. Execute the generated query which will create a table for you.
    1. Modify the query as needed to suit the correct Database / Schema / Table name.

Handling More Complex Workflows

Production use cases tend to be much more complex and include things like incremental builds & state management. In those scenarios, please take a look at our ingestion partners, which includes many options including some that offer native python. An overview of the MotherDuck Ecosystem is shown below.

Diagram