examples · errors · 2 / 19
2. 400 - unknown table
← Errors exampleswhat this error means
The SQL parsed fine, but the table named in the FROM (or JOIN, or UPDATE) clause is not declared in any registered schema for this tenant. This is the SQL-layer mirror of a schema_not_found 404 - same root cause, different surface.
what triggers it
A SELECT against a table name that doesn't exist in the catalog.
POST /v1/tenants/:t/sql
curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/sql" \
-H "Authorization: Bearer $OC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT * FROM does_not_exist"}' the canonical response body
{
"error": "unknown_table",
"message": "table 'does_not_exist' is not declared in any schema for tenant",
"retry": false
} how to recover
- List schemas for the tenant:
GET /v1/tenants/:t/schemas. Find the one you meant. - Table names are case-sensitive and fully qualified -
shop.customers, notCustomers. - If the schema is missing entirely, register the manifest first via
PUT /v1/tenants/:t/schemas/:id. retry: false- the same SQL will keep failing until the schema is in place.
common upstream causes
- Pointing at the wrong tenant in the URL (so the schema exists, but not for this tenant).
- Forgetting the schema namespace:
customersinstead ofshop.customers. - A schema migration that renamed the table on one environment but not the other.
- Copy-pasted SQL from another tenant's namespace.