t8y2/dbx · error
table is required
Error message
table is required
What it means
getColumns fetches Hive column metadata for a table and validates that a non-blank table name was supplied before issuing the GetHiveColumns RPC. A table name of "" or whitespace-only cannot be passed to the metadata provider, so the call fails fast with this error.
Source
Thrown at agents/drivers/argo-go/metadata.go:597
}
}
return false
}
// acceptsRoutineType reports whether the requested object types include the
// given routine kind (case-insensitive).
func acceptsRoutineType(objectTypes []string, routineType string) bool {
for _, objectType := range objectTypes {
if strings.EqualFold(objectType, routineType) {
return true
}
}
return false
}
func (server *server) getColumns(schema, table string) ([]columnInfo, error) {
if strings.TrimSpace(table) == "" {
return nil, errors.New("table is required")
}
schema = firstNonEmpty(schema, server.config.Database)
metadataResult, metadataErr := server.hiveMetadata(func(ctx context.Context, provider gohive.MetadataProvider) (gohive.MetadataResult, error) {
return provider.GetHiveColumns(ctx, schema, table, "%")
})
if metadataErr == nil {
rows := newHiveMetadataRows(metadataResult)
values := make([]columnInfo, 0, len(rows.rows))
for _, row := range rows.rows {
name := metadataString(rows.value(row, "COLUMN_NAME"))
if name == "" {
continue
}
dataType := metadataString(rows.value(row, "TYPE_NAME"))
columnSize := metadataIntPointer(rows.value(row, "COLUMN_SIZE"))
values = append(values, columnInfo{
Name: name,
DataType: dataType,View on GitHub (pinned to c0390bff16)
Solutions
- Ensure the client request includes a non-empty table name
- Validate table name in the caller before invoking the metadata operation
- Check argument order — schema is the first parameter, table the second; a swap can leave table empty
- Default to an explicit table name rather than relying on an empty string to mean 'any'
Example fix
// before
server.getColumns("default", "") // error: table is required
// after
if table := strings.TrimSpace(req.Table); table != "" {
server.getColumns(req.Schema, table)
} Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(table) == "" {
return errors.New("table is required")
} Try / catch
cols, err := server.getColumns(schema, table)
if err != nil && err.Error() == "table is required" {
return fmt.Errorf("describe requires a table name, got %q", table)
} Prevention
- Validate table name at the request layer
- Double-check schema/table argument order
- Never rely on empty string to mean 'all tables' — use the listing API
- Trim inputs and treat whitespace as missing
When it happens
Trigger: Calling getColumns (via the describe-table / get_columns dispatch path) with table == "" or table == " "; a client request omitting the table parameter; schema optionally defaulted from server.config.Database.
Common situations: Client tool sends describeColumns without the table field; caller transposed schema and table arguments; upstream variable never populated because a prior listing call returned empty names.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- schema and type name are required
- schema and type name are required
- lease, ttl, and preserveLease cannot be specified together
- ttl must be a positive integer
- ETCD_WATCH_SCOPE_INVALID
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/b8efda0b90d6eab2.
Report an issue: GitHub.