Datalab
Interactive data science platform for exploring and analyzing data with MotherDuck. It integrates with MotherDuck for notebooks, assistants, and AI-powered analysis workflows.
How it works with MotherDuck
DataLab connects to MotherDuck from a workbook so SQL cells can query MotherDuck data directly.
Prerequisites
- A DataLab workbook.
- A MotherDuck service token.
- Optional: a default MotherDuck database name for the connection.
Setup
- In MotherDuck, create or copy a service token.
- In DataLab, open a workbook.
- Select View > Databases.
- Select the + icon and choose MotherDuck.
- Enter a connection name, paste the service token, and optionally enter a database name.
- Connect the data source.

Authentication and configuration
- The service token is required.
- The database name is optional. When set, DataLab connects to that database by default, but other accessible databases can still be queried.
- If your environment requires network allowlisting, use the DataCamp IP addresses shown in the DataLab connection dialog.
Important notes
- Store the token only in the DataLab connection configuration.
- Use SQL cells to query the connected MotherDuck source after setup.
Use cases
- Explore MotherDuck tables in notebook-style analysis.
- Combine SQL query results with Python or chart cells in DataLab.
- Share a workbook that uses a managed MotherDuck data connection.