Skip to main content
Two SQL table functions search your Workspace’s data. They answer different questions: Both run on the same Flight SQL connection as the pools, and over SQL over HTTP. Both run only in interactive queries. A Plot cannot call them: saving the Plot records an error, and the Plot cannot publish until you remove the call. Search first, then write the Plot’s SQL against the source table.

Find tables and columns

search_available_data(query [, scope [, kind]]) searches the names and descriptions of tables and columns in the Provider and Workspace pools. It returns only the pools your role can query.
scope starts with providers or workspace, such as providers.linear or providers.linear.issues.*. kind is 'table' or 'column'. Search Available Data lists every scope pattern and result column.

Find records by what they say

search_everything finds rows in the Provider pool whose text matches a question by meaning, not only by keyword. It returns one row for each matching source record, never one row for each passage.
Ask your Parable representative to turn on search for your Workspace. Until then, search_everything returns no rows.

What is searchable

search_everything searches only the Provider pool, and only the text fields that a Provider’s Tap schema marks for search with x-transformEmbed. Some fields are searched with context from the same record. For example, an issue’s title comes before its body. A call transcript is searched as windows of speaker turns. A Notion page is searched as its blocks, under its title, and its column_name is blocks.

Arguments

search_everything(query [, scope [, limit]]) takes up to three arguments, by position only. Named arguments (query => ...) are refused. Parable refuses arguments that it cannot search before anything runs:
  • A scope that does not start with providers.
  • A limit outside 1 to 100, or a limit that is not a whole number.
  • An empty query.
  • A query or scope that is not a text literal.
The refusal is INVALID_ARGUMENT with error code QL-PL-018. Its message names the argument and what to use instead. Over HTTP, it is a 400 with the same code.

Results

The snippet is not the whole record. Read the record from its source table.

Join back to the source table

row_key is a JSON object of the source table’s key columns. Read a text key with json_get_str and a numeric key with json_get_int:
Use the key names that row_key holds. A record with more than one key column matches on each of them.

Policies apply

Parable reads each matching record again from its source table before it returns the record. That read applies the same Provider Policies and source permissions as your own query of the table. A record that a Policy hides from you is left out, and its text never appears in a snippet. If you cannot query the Provider pool, you see no records. When one source table takes too long to read, its records are left out of the result, and records from other tables still return. When no source table can be read in time, the search fails with DEADLINE_EXCEEDED and error code QL-TO-004. Over HTTP, it is a 504 with the same code. The message names the time limit. Run the search again. If it fails again, narrow the scope to fewer tables, such as providers.linear.*.

An empty result

An empty result does not prove that nothing matches. search_everything also returns no rows when:
  • Search is not turned on for your Workspace.
  • The Workspace’s AI policy admits no embedding model for this search.
  • The search index is missing or still building.
  • A record’s text changed after Parable indexed it, until the index catches up.
In these cases, find the table with search_available_data and query it directly.