Errors
400 - unknown table
What happened
The requested table cannot be resolved in the current tenant and namespace. It may be misspelled or not registered.
- Confirm the connectionCheck the tenant and instance you are using.
- Look up the schemaFind the exact namespace and table name.
- Use the qualified nameCorrect the query or register the intended missing schema.
- Check the new resultConfirm the request now reaches the correct table.
Request that triggers it
A SELECT against a table name that doesn't exist in the catalog.
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"}'Read the response
{
"error": "unknown_table",
"message": "table 'does_not_exist' is not declared in any schema for tenant",
"retry": false
}Fix the request
- Check the instance and tenant connection.
- List the available schemas.
- Use the qualified namespace.table name.
- Register the intended schema if it is missing.
Keep in mind: A table with the same name in another tenant is not available through this connection.
Common 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.
Continue
See error handling and retries, or return to error examples.