Skip to Content
dropshelf

Use company data in a drop

Show your company's own data in a drop through a connector source, and see what each query runs under.

A dropshelf drop can show live figures from your company's own databases, such as a sales dashboard that reads the warehouse. This page explains how that works for the member who builds the drop, and what the drop's visitors see.

A source can also be an MCP server, which signs each member in itself. Use an MCP server's data in a drop covers those.

Prerequisites

  • Your instance has connectors turned on. An admin turns them on, as Turn on optional features describes. While they are off, a version that carries queries is refused.
  • An admin has connected a source and given you, or everyone, access to it.

Connector sources and access

A connector source is one company database that an admin has connected to dropshelf, a Postgres database or a Snowflake account. Each source has a short name, such as sales. The source signs in with a read-only role, and its credential stays with dropshelf.

An admin decides who may use each source. Access goes to one person by email address, or to Everyone on the instance. It covers everything the source can read, or only the schemas and tables the admin chose. Some access is for restricted and private drops only. A public drop cannot publish a query that runs under it, so make the drop restricted first.

To find the sources you may use and what you may read on each, ask your agent. Over MCP it has list_sources and describe_source, and run_query to try a statement. If you need a source you cannot use, ask an admin for access to it.

Add queries to a drop

A drop never sends SQL from the page. You name each query in the folder you publish, and the page calls it by name:

  1. Put a file named _dropshelf/queries.yaml at the root of the folder. Each query in it names its source, one SELECT statement and its parameters.
  2. In the page, call a query through the in-page API, dropshelf.connect('<source>').run('<query>'). The answer holds the columns, the rows and when the numbers were read.
  3. Publish the folder as usual.

Build on the drop platform walks through a queries file, and the JavaScript API reference lists every call and error. An agent that builds the drop for you knows both.

When you publish, dropshelf checks every query against the database. It refuses a version whose query writes, reads outside your access, or uses a source you may not use. The message names the query and the reason.

How a query runs

Each query runs under the access of the member who published it, never the visitor's. A visitor needs no access to the source, only to the drop. So a drop you share shows the same figures to everyone who can open it.

A query can still answer per visitor. Two parameters, :viewer_id and :viewer_email, are filled in by dropshelf from the signed-in visitor. A query that uses them is answered separately for each visitor.

Answers are cached for the source's cache time, 15 minutes unless an admin set another. Everyone who opens the drop shares one cached answer, except for a query that uses the visitor parameters.

What visitors see

Visitors see the drop's page with the figures in it. They never see the SQL or the credential.

If the access a query runs under is narrowed or removed, the query is blocked. The page's call for it is refused until the access covers it again, or until someone it does cover publishes the drop again. How a blocked query looks to a visitor is up to the page, so show a clear message when a call fails.

The drop's owner and editors are told in the bell when a query of theirs is blocked.

See the drop's queries

To see the queries of the live version:

  1. Open the drop, and select the Settings tab in its panel.
  2. Under Data, open Connected sources.

The queries are grouped by source. Each one shows its state, what it runs under, and its runs and failures over the last seven days. Select a query to see its entry in _dropshelf/queries.yaml, with how long its answers are cached. A blocked query says why.

The Settings tab is there for the drop's owner, its editors and admins.

Next steps

Last updated .

On this page