Bonnard

Each foreign key the database declares is a join from the start. On MySQL / MariaDB, Bonnard does not read foreign keys, so add those joins yourself. Changes wait in a draft until you publish it. To make sure that a change saved, review the draft.

Requirements

  • The Editor role or higher in your workspace.
  • To work from your AI client: Bonnard connected and access to the data source.

Add a join

Start from the table that holds the reference: refunds, for a join from refunds to orders. A join has up to 4 column pairs, and each pair must have matching types. The two tables must be different.

In your AI client

Ask:

In <data source>, add a join from <table> to <other table> on <table>.<column> = <other table>.<column>.

In the console

  1. In the console at app.bonnard.ai, select Context, then Tables, then the table that holds the reference. With more than one data source, select one at the top right first.
  2. Under Joins, select Add join.
  3. Under Joins to, select Pick a table, then the other table.
  4. Select a column on each side. For another pair, select + Add column.
  5. Select Add join. The join shows with the badge edited.

These columns have different types. means that the pair cannot be joined. The database already declares this join. means that the join exists.

Remove a join

AI clients keep a live join until you publish the draft. A join the database declares cannot be removed, so it is hidden from AI clients instead.

In your AI client

Ask:

In <data source>, remove the join from <table> to <other table>.

Bonnard removes a join in the live version only after the agent sends confirmed: true. The agent is told to ask you first. The same request hides a join the database declares. If the two tables join more than one way, name the columns in the request.

In the console

  1. On either table’s page in Context, find the join under Joins.
  2. Select Remove. For a join with the badge database, select Hide from AI clients.

Undo shows for 6 seconds after Remove. Show to AI clients brings back a hidden join.

Accept a suggested join

Bonnard suggests a join when a column named <name>_id matches a table named <name> or <name>s with a single-column key or an id column. Agents do not get suggestions.

In the console

Console only
  1. On the table’s page in Context, find the join with the badge Suggested under Joins.
  2. Select Confirm to add it to the draft, or Dismiss to add the dismissal to the draft.

After you publish a dismissal, only a revert brings the suggestion back.