Skip to main content

Sources

Docs: Flight SQL · Provider Pool · API tokens Web App: Protection → Access Tokens and Catalog → Providers in your Workspace. This guide takes you from no access to a first query result against the data your Providers sync into Parable. You create a token in your Workspace, connect DBeaver or Python to Parable’s SQL endpoint, and query the Provider Pools with read-only SQL. You need:
  • a Workspace with at least one connected Provider;
  • a Workspace Administrator who can give you a role;
  • DBeaver, or Python 3.10 or later.
Every connection uses these values: Parable’s staging environment uses sql.staging.parable.work. Use it only when Parable asks you to test there, with a token created in your staging Workspace.

1. Get the Provider Pools Reader role

Ask a Workspace Administrator to give you the Provider Pools Reader role. It lets you query the Provider Pools over SQL and browse the Data Catalog, and nothing else. The administrator:
  1. Opens People → Users.
  2. Opens the actions on your row and chooses Edit Roles.
  3. Selects Provider Pools Reader and chooses Save.
The Data Access and Workspace Administrator roles also let you query, and they reach the Workspace’s other pools too. A member who holds only Viewer cannot query.

2. Create a SQL token

  1. Sign in to your Workspace and open Protection → Access Tokens. Its address is https://<workspace-slug>.parable.work/platform/protection/access-tokens.
  2. In Your tokens, choose Create token.
  3. Enter a Name that says where you will use it, such as DBeaver on my laptop.
  4. Under Expires in, choose 30 days, 90 days, 180 days, or 1 year. The default is 90 days.
  5. Choose Create token.
  6. Copy the token and store it in your password manager. Parable shows it once and cannot show it again. Then choose I have saved it.
The token:
  • works only with SQL, and only in the Workspace where you created it;
  • runs each query with your roles at that moment, so it stops working when your role or your membership is removed;
  • stops working when it expires or is revoked.
To revoke a token, open Protection → Access Tokens, open the token’s actions in Your tokens, and choose Revoke token. Workspace Administrators see every member’s token under Members’ tokens and can revoke any of them. People who manage the Workspace’s sign-in can turn tokens off; while they are off, every token is refused and nobody can create one. Treat the token like a password. Create one token for each tool or script, so you can revoke one without breaking the others.

3. Find your Workspace slug

The slug is the first part of your Workspace’s web address. For https://acme.parable.work, the slug is acme. In staging, the address is https://acme.staging.parable.work and the slug is still acme. Your SQL tool sends it as x-tenant on every call. A token works only with the slug of the Workspace that created it.

4. Connect DBeaver

DBeaver connects through the Apache Arrow Flight SQL JDBC driver. Other JDBC tools, such as DataGrip, use the same driver, class, URL, and properties.

Run DBeaver on Java 21

Recent DBeaver releases run on Java 25. The driver does not support Java 25, and on it Test Connection fails with ExceptionInInitializerError and Could not initialize class org.apache.arrow.memory.RootAllocator. Point DBeaver at Java 21 before you add the driver:
  1. Install Java 21, for example Eclipse Temurin 21 from Adoptium, or run brew install openjdk@21 on macOS.
  2. Quit DBeaver.
  3. Open dbeaver.ini in a text editor. It is in the DBeaver installation:
  4. Find the line that reads -vm. Replace the line below it with the path to Java 21’s java program (javaw.exe on Windows). If the file has no -vm line, add -vm and the path as two lines at the top of the file. Both lines must come before -vmargs. With Homebrew on macOS, this command prints the path:
  5. On the line after -vmargs, add --add-opens=java.base/java.nio=ALL-UNNAMED if the file does not already have it.
  6. Save the file and start DBeaver.
The start of the file then looks like this, with your own Java path:
dbeaver.ini
A DBeaver upgrade replaces dbeaver.ini, so repeat these steps after each upgrade.

Add the driver

  1. Download the flight-sql-jdbc-driver jar, version 18 or 19, from Maven Central.
  2. In DBeaver, open Database → Driver Manager and choose New.
  3. On Settings, enter:
  4. On Libraries, choose Add File and pick the jar. If DBeaver offers a list of driver classes, choose org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver.
  5. Choose OK.

Create the connection

  1. Choose Database → New Database Connection, pick Arrow Flight SQL, and choose Next.
  2. Set Host to sql.parable.work and Port to 443. Leave Username and Password empty.
  3. Open Driver properties. Right-click in the list, choose Add new property, and add these two properties:
  4. Choose Test Connection. DBeaver reports that it is connected.
  5. Choose Finish.
The driver uses TLS by default. Do not set useEncryption=false.

5. Connect with Python

Install the ADBC Flight SQL driver and PyArrow:
Put your token and Workspace slug in environment variables, so the token stays out of your code:
Save this script as first_query.py:
first_query.py
Run it:
It prints the address of every Provider table you can query, then the first 10 rows of the first one. grpc+tls:// connects with TLS. ADBC requires header names in lowercase, so write x-tenant exactly as shown. autocommit=True tells the driver not to open a transaction, since SQL access is read-only and has none.

6. Run a first query

Every Provider table has a three-part address:
{connector} is the Provider’s technical name, such as google or github, and {table} is one of its tables, such as users. There is no USE statement, so always write the full address. In DBeaver, select the connection and open SQL Editor → New SQL script. In Python, pass the SQL to cursor.execute. Run:
Replace <connector> and <table> with a table you can query, for example providers.google.users. DBeaver’s Database Navigator lists them under the providers catalog, and the Python script above prints them. A table can exist before its Provider’s first sync writes rows. An empty result, or the error No data has been written for this table yet, means the table has no data yet, not that your connection is wrong.

7. Find tables in the Data Catalog

The Data Catalog lists every Provider table with its address and columns.
  1. In your Workspace, open Catalog → Providers.
  2. Expand a Provider to list its tables. The Address column holds the name to use in SQL, such as providers.google.users.
  3. Expand a table to see its columns, their types, and whether they can be null.
You can also list tables and columns with SQL:
To find which tables hold some kind of data, search by meaning with search_available_data. Discover tables and columns covers the other discovery calls.

What you can query

The Provider Pools Reader role reaches three catalogs: The Workspace’s other pools, workspace, artifacts, and parables, need the Data Access role. With Provider Pools Reader, a query that names them fails with Query references an unknown relation. Within these catalogs, the Workspace’s Provider Policies decide which rows of each Provider table your roles read. A table hidden from your roles reads as empty, and its quarantine and quality tables follow it.

System columns

Every table in the providers catalog has these columns beside the Provider’s own fields: A row is written only when a load changes it, so WHERE dt = '<day>' returns the rows that changed that day, not the whole table. To read current records, read the whole table and filter on the state columns:
Read row state explains these columns in more detail.

Limits

  • Read-only. Only SELECT statements run. Any other statement fails with Only read-only SELECT queries are supported. There are no transactions.
  • One hour per query. The hour covers planning and the whole result, including the time your tool spends reading it. A longer query fails with DEADLINE_EXCEEDED, error code QL-TO-002, and query <id> exceeded timeout of 3600s. Set your tool’s own timeout to at least an hour if you run long queries.
  • 2,000,000 rows per result. A query whose result has more rows fails with RESOURCE_EXHAUSTED and error code QL-SQ-005; nothing is cut off silently. The error can arrive after some rows, so discard any rows your tool read before it. Add LIMIT, filter with WHERE, or aggregate in SQL. To read more rows than that, run one query per range of a column, such as one month at a time.
  • Shared memory. The queries running on one Query Layer replica share one memory pool and one temporary disk. A query that asks for more than is left fails with RESOURCE_EXHAUSTED and error code QL-IN-009, whether its own size or the queries beside it used the space. Provider tables are partitioned by dt, the day a load wrote the row, so a WHERE dt bound skips the files of other days. Grouping, DISTINCT, joins, and sorts over every day of a large table need the most memory: bound dt first, and run large queries one at a time rather than together.
  • 600 requests a minute from one IP address. A query takes at least two requests, and DBeaver sends more while you browse. Requests over the limit are refused with HTTP status 429, which most tools report as UNAVAILABLE.
  • The Provider Pools only. The Provider Pools Reader role reaches the three catalogs above and nothing else.
  • One Workspace per token. To query another Workspace, create a token there.

ODBC tools

Parable has no ODBC driver yet. Tools that need one, such as Power BI and Tableau, are not supported. Use DBeaver, another JDBC tool, or Python.

Troubleshooting

Tools show an error as a gRPC status and a message, such as UNAUTHENTICATED: token expired, and each tool wraps them in its own words. Python ADBC, for example, reports PERMISSION_DENIED: insufficient permissions as UNAUTHORIZED: [FlightSQL] insufficient permissions (PermissionDenied; Prepare). Match on the message.