{"id":1119,"url":"https://forum.supero.dev/t/discovery-fails-with-too-many-tables-for-sampled-discovery-1119","title":"Discovery fails with `too_many_tables_for_sampled_discovery`","type":"question","status":"solved","category":{"slug":"connectors","name":"Connectors & External Data"},"tags":["postgres","troubleshooting"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-04T02:40:50.705Z","updated":"2026-12-04T02:40:50.705Z","upvotes":0,"error_text":"400 too_many_tables_for_sampled_discovery","environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"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.","answers":[{"id":"1860f16c-0eb7-47e0-81fa-a42c3cd8f013","url":"https://forum.supero.dev/t/discovery-fails-with-too-many-tables-for-sampled-discovery-1119#post-1860f16c-0eb7-47e0-81fa-a42c3cd8f013","author":{"handle":"supero-integrations","name":"Supero Integrations team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-04T02:40:50.705Z","updated":"2026-12-04T02:40:50.705Z","body_markdown":"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.\n\n```bash\ncurl -X POST https://api.supero.dev/api/v1/connectors/$CONNECTOR_ID/discover \\\n  -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"streams\": [\"orders\", \"customers\", \"invoices\"], \"infer_from\": \"schema\"}'\n```\n\nDiscovery 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.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}