prestodb/presto · error · PrestoException
SHEETS_UNKNOWN_TABLE_ERROR
SHEETS_UNKNOWN_TABLE_ERROR
Error message
Metadata not found for table
What it means
Metadata lookup guard: getTableMetadata was asked for a table whose entry is absent from the sheets-connector's in-memory table metadata (loaded from the configured spreadsheet), so the table is unknown to this connector.
Source
Thrown at presto-google-sheets/src/main/java/com/facebook/presto/google/sheets/SheetsMetadata.java:106
Optional<Set<ColumnHandle>> desiredColumns)
{
SheetsTableHandle tableHandle = (SheetsTableHandle) table;
ConnectorTableLayout layout = new ConnectorTableLayout(new SheetsTableLayoutHandle(tableHandle));
return new ConnectorTableLayoutResult(layout, constraint.getSummary());
}
@Override
public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
{
return new ConnectorTableLayout(handle);
}
@Override
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)
{
Optional<ConnectorTableMetadata> connectorTableMetadata = getTableMetadata(session, ((SheetsTableHandle) table).toSchemaTableName());
if (!connectorTableMetadata.isPresent()) {
throw new PrestoException(SHEETS_UNKNOWN_TABLE_ERROR, "Metadata not found for table " + ((SheetsTableHandle) table).getTableName());
}
return connectorTableMetadata.get();
}
private Optional<ConnectorTableMetadata> getTableMetadata(ConnectorSession session, SchemaTableName tableName)
{
if (!listSchemaNames().contains(tableName.getSchemaName())) {
return Optional.empty();
}
Optional<SheetsTable> table = sheetsClient.getTable(tableName.getTableName());
if (table.isPresent()) {
List<ColumnMetadata> columns = table.get().getColumnsMetadata().stream()
.map(column -> column.toBuilder()
.setName(normalizeIdentifier(session, column.getName()))
.build())
.collect(toImmutableList());
return Optional.of(new ConnectorTableMetadata(tableName, columns));View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the table name exists in the configured spreadsheet
- Reload/refresh the sheets metadata cache
- Check the credentials file has access to the spreadsheet
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-google-sheets/src/main/java/com/facebook/presto/google/sheets/SheetsMetadata.java:106 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e4db29f249488e7e.
Report an issue: GitHub.