To chart MotherDuck data in Claude, ChatGPT or another AI client, connect it here, then create an app on it.
Bonnard reads MotherDuck through an access token, so your apps query only the databases attached to the token’s account.
DataConnect the databases and integrations your apps read.Available connectionsDatabasesPostgreSQLBigQueryRedshiftClickHouseMotherDuckMySQL / MariaDBMSSQLIntegrationsPostHogDemo dataEcommerceEcommerceSetting up…PostHogDatabaseConnect a databaseConnection nameAcme sampleConnectionmotherduckDatabase (optional)acmeFor a database-per-tenant setup, use one sample tenant database here;set the per-tenant naming under Tenancy. Every database this appshould reach must already be attached to that account's workspace,which takes a read/write token: a Read Scaling token cannot attach.MotherDuck token••••••••••••••••••••••••••••••••••••••••••An access token for the MotherDuck service account that owns thosedatabases. For concurrent use, create it with type Read Scaling(Business plan) and set that account's read-scaling pool size. ARead/Write token runs every query on the account's one Duckling, oneat a time while it is busy. Nothing here can tell the two apart, so checkthe type in MotherDuck's Settings. Paste a token; a headlessconnection cannot use browser login. Stored encrypted, never logged.Encrypted at rest.SaaS safe modeonAllow our IP addressesIf your database is firewalled, allowlist these egress IPs so we can reach it:208.77.244.241208.77.244.242152.55.184.240These addresses are stable. We will give advance notice before any change.Test & connectBackTesting connection...Back1Details2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseConnection nameAcme sampleConnectionmotherduckDatabase (optional)acmeFor a database-per-tenant setup, use one sample tenant database here;set the per-tenant naming under Tenancy. Every database this appshould reach must already be attached to that account's workspace,which takes a read/write token: a Read Scaling token cannot attach.MotherDuck token••••••••••••••••••••••••••••••••••••••••••An access token for the MotherDuck service account that owns thosedatabases. For concurrent use, create it with type Read Scaling(Business plan) and set that account's read-scaling pool size. ARead/Write token runs every query on the account's one Duckling, oneat a time while it is busy. Nothing here can tell the two apart, so checkthe type in MotherDuck's Settings. Paste a token; a headlessconnection cannot use browser login. Stored encrypted, never logged.Encrypted at rest.SaaS safe modeonAllow our IP addressesIf your database is firewalled, allowlist these egress IPs so we can reach it:208.77.244.241208.77.244.242152.55.184.240These addresses are stable. We will give advance notice before any change.Test & connectBackTesting connection...Back1Details2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseconnectedAcme sampleNo tenancyDatabase per tenantNo customer routing is applied. Every allowed caller sees the data available to this credential.Save & continueBackSaving…BackconnectedAcme sampleNo tenancyDatabase per tenantEach tenant gets its own database.Representative database*customer_acmeOne real, existing tenant database. We connect + read table shapes from it (they're identical across tenants). Required.How are tenant databases named?Naming patternMap each tenantcustomer_{tenant}Preview: tenantacmedatabase…Enter a representative database so we can read the table shapes.Save & continueBackDetails2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseconnectedAcme sampleNo tenancyDatabase per tenantNo customer routing is applied. Every allowed caller sees the data available to this credential.Save & continueBackSaving…BackconnectedAcme sampleNo tenancyDatabase per tenantEach tenant gets its own database.Representative database*customer_acmeOne real, existing tenant database. We connect + read table shapes from it (they're identical across tenants). Required.How are tenant databases named?Naming patternMap each tenantcustomer_{tenant}Preview: tenantacmedatabase…Enter a representative database so we can read the table shapes.Save & continueBackDetails2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseConnection saved"Acme sample" is ready to use.4 tables discovered · No tenancySearch tables…4 tablesSchemaTable ↑TypeRowsColumnsmaincustomerstable11845mainproductstable524mainorderstable49206mainorder_itemstable134075Next stepCreate an app so your users can query these tables from their AI client.Create an app Or view source detailsBack to setupDetailsTenancyDoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseConnection saved"Acme sample" is ready to use.4 tables discovered · No tenancySearch tables…4 tablesSchemaTable ↑TypeRowsColumnsmaincustomerstable11845mainproductstable524mainorderstable49206mainorder_itemstable134075Next stepCreate an app so your users can query these tables from their AI client.Create an app Or view source detailsBack to setupDetailsTenancyDoneNeed help?Setup guideConnection details areencrypted at rest.
Requirements
The Admin role in your Bonnard workspace.
A MotherDuck account, such as a service account, with the databases apps should query attached to its workspace.
1. Create an access token
Bonnard connects with this token. Agents can query every database attached to its account.
In MotherDuck, open Settings. For a service account, open it under Service Accounts.
Select Create token, enter a name, and choose the token type from the table below.
Copy the token.
MotherDuck token types
Token type
Choose it when
Read Scaling
Your MotherDuck plan is Business or Enterprise. The token can only read, and queries run in parallel on the account’s read-scaling pool. Results can lag the latest writes by a few minutes. This token cannot attach databases, so attach them first with a Read/Write token.
Read/Write
Your plan has no read scaling. Every query runs on the account’s one Duckling. Bonnard runs read-only queries either way.
2. Add the connection
In the console at app.bonnard.ai, select Data, then MotherDuck.DataConnect the databases and integrations your apps read.Available connectionsDatabasesPostgreSQLBigQueryRedshiftClickHouseMotherDuckMySQL / MariaDBMSSQLIntegrationsPostHogDemo dataEcommerceEcommerceSetting up…PostHogDataConnect the databases and integrations your apps read.Available connectionsDatabasesPostgreSQLBigQueryRedshiftClickHouseMotherDuckMySQL / MariaDBMSSQLIntegrationsPostHogDemo dataEcommerceEcommerceSetting up…PostHog
Enter a Connection name and the details from the table below.DatabaseConnect a databaseConnection nameAcme sampleConnectionmotherduckDatabase (optional)acmeFor a database-per-tenant setup, use one sample tenant database here;set the per-tenant naming under Tenancy. Every database this appshould reach must already be attached to that account's workspace,which takes a read/write token: a Read Scaling token cannot attach.MotherDuck token••••••••••••••••••••••••••••••••••••••••••An access token for the MotherDuck service account that owns thosedatabases. For concurrent use, create it with type Read Scaling(Business plan) and set that account's read-scaling pool size. ARead/Write token runs every query on the account's one Duckling, oneat a time while it is busy. Nothing here can tell the two apart, so checkthe type in MotherDuck's Settings. Paste a token; a headlessconnection cannot use browser login. Stored encrypted, never logged.Encrypted at rest.SaaS safe modeonAllow our IP addressesIf your database is firewalled, allowlist these egress IPs so we can reach it:208.77.244.241208.77.244.242152.55.184.240These addresses are stable. We will give advance notice before any change.Test & connectBackTesting connection...Back1Details2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseConnection nameAcme sampleConnectionmotherduckDatabase (optional)acmeFor a database-per-tenant setup, use one sample tenant database here;set the per-tenant naming under Tenancy. Every database this appshould reach must already be attached to that account's workspace,which takes a read/write token: a Read Scaling token cannot attach.MotherDuck token••••••••••••••••••••••••••••••••••••••••••An access token for the MotherDuck service account that owns thosedatabases. For concurrent use, create it with type Read Scaling(Business plan) and set that account's read-scaling pool size. ARead/Write token runs every query on the account's one Duckling, oneat a time while it is busy. Nothing here can tell the two apart, so checkthe type in MotherDuck's Settings. Paste a token; a headlessconnection cannot use browser login. Stored encrypted, never logged.Encrypted at rest.SaaS safe modeonAllow our IP addressesIf your database is firewalled, allowlist these egress IPs so we can reach it:208.77.244.241208.77.244.242152.55.184.240These addresses are stable. We will give advance notice before any change.Test & connectBackTesting connection...Back1Details2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.
Select Test & connect. Bonnard connects with the token and reads the tables in Database.
MotherDuck connection fields
Field
Enter
Connection name
A name for this database in Bonnard, such as Production.
Connection
Keep motherduck.
Database
The database to read. Empty means my_db. If each tenant (the customer a caller belongs to) has its own database, enter one of them.
MotherDuck token
The token from step 1.
SaaS safe mode
Keep on. It stops queries from reading local files or loading extensions.
3. Choose the tenancy
Choose how callers see the data, then select Save & continue.
Tenancy options
Option
Use it when
No tenancy
Every caller should see the same data.
Database per tenant
Each tenant’s tables sit in their own database, named by a pattern such as customer_{tenant}. Queries go to the caller’s database, but can name any database the token reaches.
DatabaseConnect a databaseconnectedAcme sampleNo tenancyDatabase per tenantNo customer routing is applied. Every allowed caller sees the data available to this credential.Save & continueBackSaving…BackconnectedAcme sampleNo tenancyDatabase per tenantEach tenant gets its own database.Representative database*customer_acmeOne real, existing tenant database. We connect + read table shapes from it (they're identical across tenants). Required.How are tenant databases named?Naming patternMap each tenantcustomer_{tenant}Preview: tenantacmedatabase…Enter a representative database so we can read the table shapes.Save & continueBackDetails2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseconnectedAcme sampleNo tenancyDatabase per tenantNo customer routing is applied. Every allowed caller sees the data available to this credential.Save & continueBackSaving…BackconnectedAcme sampleNo tenancyDatabase per tenantEach tenant gets its own database.Representative database*customer_acmeOne real, existing tenant database. We connect + read table shapes from it (they're identical across tenants). Required.How are tenant databases named?Naming patternMap each tenantcustomer_{tenant}Preview: tenantacmedatabase…Enter a representative database so we can read the table shapes.Save & continueBackDetails2Tenancy3DoneNeed help?Setup guideConnection details areencrypted at rest.
Connection saved shows the number of tables discovered.
DatabaseConnect a databaseConnection saved"Acme sample" is ready to use.4 tables discovered · No tenancySearch tables…4 tablesSchemaTable ↑TypeRowsColumnsmaincustomerstable11845mainproductstable524mainorderstable49206mainorder_itemstable134075Next stepCreate an app so your users can query these tables from their AI client.Create an app Or view source detailsBack to setupDetailsTenancyDoneNeed help?Setup guideConnection details areencrypted at rest.DatabaseConnect a databaseConnection saved"Acme sample" is ready to use.4 tables discovered · No tenancySearch tables…4 tablesSchemaTable ↑TypeRowsColumnsmaincustomerstable11845mainproductstable524mainorderstable49206mainorder_itemstable134075Next stepCreate an app so your users can query these tables from their AI client.Create an app Or view source detailsBack to setupDetailsTenancyDoneNeed help?Setup guideConnection details areencrypted at rest.
Troubleshooting
DuckDB local-file mode is not available on the hosted service. Use MotherDuck, or self-host Bonnard. Set
Connection to motherduck.
Query exceeded the 30s time limit. MotherDuck did not return the table list in time. Select Test & connect
again.
Connected, but introspect failed: <message> The token cannot read the table list. Fix what the message names.
No tables are discovered. Check Database: a database the account has not attached shows no tables and no error.
A table is missing. Check that it is in Database, then select Re-introspect on the database’s Tables
tab.
Any other error is MotherDuck’s own message. Check the field it names, then select Test & connect again.
Charts in your AI client
Create an app on this database, so AI clients such as Claude and ChatGPT can query it and draw charts.