Skip to content
Community forum

Discovery fails with too_many_tables_for_sampled_discovery

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

Error message
400 too_many_tables_for_sampled_discovery

Our database has a few hundred tables. I called POST /api/v1/connectors/{id}/discover with 140 table names in streams and got a 400.

Link

1 answer

Accepted answer
Accepted answer

Discovery samples real rows by default (infer_from: "samples"), and sampled discovery takes at most 100 tables per run. Either run it in batches of 100 or fewer, or send infer_from: "schema", which skips row sampling and scales much further at the cost of less accurate type inference.

bash
curl -X POST https://api.supero.dev/api/v1/connectors/$CONNECTOR_ID/discover \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"streams": ["orders", "customers", "invoices"], "infer_from": "schema"}'

Discovery is asynchronous. It returns 201 with an execution_id that you poll, and starting a second one while another is running on the connector returns 409. The results endpoint returns HTTP 200 even when discovery failed, so read its error and message keys rather than the status code. Nothing is created from the proposal until you add the tables to target.tables and PUT the connector.

Supero Integrations teamSupero team answered
Link

Your answer

Discovery fails with too_many_tables_for_sampled_discovery | Supero Community