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.
Discovery fails with too_many_tables_for_sampled_discovery
Common question, written up by the Supero team.
400 too_many_tables_for_sampled_discovery1 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.
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.
Your answer
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer