Connect your app to MotherDuck
Connect your MotherDuck account to Lovable to run queries and build interactive dashboards or reports from your cloud database. Lovable tests your connection securely and uses your existing database tables to create your app features.
Anyone who keeps data in MotherDuck and wants to build dashboards, search tools, or reports in Lovable.
Do this, in order
- 1
Sign in to MotherDuck, go to Settings > Access Tokens, and create a Read/Write or Read Scaling token.
Lovable needs this access token to authenticate and communicate with your MotherDuck database.
- 2
Open Connectors in your Lovable dashboard, select MotherDuck, and click Connect.
This starts the setup process for linking your database to your Lovable workspace.
- 3
Paste your token into the MotherDuck access token field, configure workspace sharing if desired, and click Connect.
Lovable verifies the token by checking your database list before saving the connection.
- 4
Open your project chat and ask Lovable to link to your MotherDuck connection and build your data views.
This connects your specific project to the database and instructs Lovable to write queries against your real schema.
Paste this into your project
Use MotherDuck and build a dashboard of monthly revenue and order counts from our orders table. Aggregate the data in SQL, include charts for monthly trends, and add a paginated preview table for recent orders.
Words decoded
- MotherDuck
- A cloud service that hosts analytical databases and lets you run fast queries over large datasets.
- SQL query
- A structured text instruction sent to a database to search, summarize, or modify data.
- Read Scaling token
- An access key that only allows viewing data, blocking any accidental changes to your database.
- Share
- A read-only database hosted in MotherDuck that another account has made accessible to you.
Where people get stuck
- Queries that return more than 2,000 rows or 50 KB will fail with an error, so always ask Lovable to paginate, filter, or aggregate data in SQL.
- Data accessed through a Read Scaling token may be a few minutes behind real-time updates and will reject any attempts to edit data.
- Lovable cannot query DuckDB database files saved locally on your computer; you must upload them to MotherDuck first.
- Queries run against your MotherDuck account and use compute that counts toward your MotherDuck billing plan.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.