
MotherDuck
Publish a read-only MotherDuck share that exposes partner-level totals from one approved view.
- Producer
- Internal data has opportunity rows and owner emails.
- Include pattern
- The share includes partner_bookings only.
- Recipient
- A restricted user reads the approved aggregate.
Give the partner team the weekly total
Create a test database in MotherDuck. Build a view named partner_bookings with one weekly row per approved partner and fields for partner code, week, and booked amount. Create a Share with an INCLUDE pattern that exposes only that view. Grant it to a named test recipient or role in your organization, then attach it using a separate recipient connection.
Use two synthetic bookings of $12,000 and $8,000 for partner P-17 in the same week. Keep a raw source field such as owner_email out of the published view. Validate the recipient’s visible tables before testing the total. If you later grant separate partners access to a shared view, use tenant-scoped controls or separate shares and run the access checks with each identity.
| Recipient action | Expected result |
|---|---|
| Queries partner_bookings | The approved view returns $20,000 for P-17 and the expected week. |
| Looks for the raw opportunity table | The base table is unavailable from this Share. |
| Attempts to update the exposed data | The shared data remains read-only. |
Write the recipient, included view, and refresh expectation into the access review.