t8y2/dbx · error
routine source is not supported for %s connections
Error message
routine source is not supported for %s connections
What it means
getObjectSource routes PROCEDURE/FUNCTION requests to getRoutineSource, which reads from Transwarp Inceptor system views (system.procedures_v / system.functions_v). Plain Hive and other engine types have no routine source support, so requesting a routine's source on such a connection returns this error naming the connection's DatabaseType.
Source
Thrown at agents/drivers/hive-go/metadata.go:744
for _, row := range result.Rows {
if line := firstRowValue(row); line != "" {
lines = append(lines, line)
}
}
if len(lines) == 0 {
return "", nil
}
return strings.Join(lines, "\n") + "\n", nil
}
func (server *server) getObjectSource(database, schema, name, objectType string) (objectSource, error) {
schema = firstNonEmpty(schema, database, server.config.Database)
var source string
var err error
switch strings.ToUpper(objectType) {
case "PROCEDURE", "FUNCTION":
if !server.supportsRoutines() {
return objectSource{}, fmt.Errorf("routine source is not supported for %s connections", server.params.DatabaseType)
}
source, err = server.getRoutineSource(database, schema, name, strings.ToUpper(objectType))
default:
source, err = server.getTableDDL(schema, name)
}
if err != nil {
return objectSource{}, err
}
return objectSource{
Name: name,
ObjectType: strings.ToUpper(objectType),
Schema: optionalString(schema),
Source: source,
}, nil
}
// getRoutineSource fetches a procedure or function's full source from the
// server's system.procedures_v / system.functions_v view. Returns an emptyView on GitHub (pinned to c0390bff16)
Solutions
- Only request routine sources on Argo/Inceptor (Transwarp) connections
- For plain Hive, request TABLE object sources (SHOW CREATE TABLE) instead
- Hide/disable the routines node in client UI when the connection's databaseType doesn't support routines
- If routine support is needed, connect via an Inceptor (Transwarp) database type
Example fix
// before: requesting function source on plain Hive
source := getObjectSource(db, schema, name, "FUNCTION")
// after: check the database type first
if isRoutineCapable(dbType) { // argo, inceptor, inceptor2, transwarp
source = getObjectSource(db, schema, name, "FUNCTION")
} else {
source = getObjectSource(db, schema, name, "TABLE")
} Defensive patterns
Strategy: validation
Validate before calling
const routineCapable = ["argo", "inceptor", "inceptor2", "transwarp"]
if ((objectType === "PROCEDURE" || objectType === "FUNCTION") && !routineCapable.includes(dbType)) {
throw new Error(`routine source requires an Inceptor-family connection, got ${dbType}`)
} Try / catch
src, err := server.getObjectSource(db, schema, name, objectType)
if err != nil && strings.Contains(err.Error(), "routine source is not supported") {
return objectSource{}, fmt.Errorf("%w (use a TABLE source or an Inceptor connection)", err)
} Prevention
- Gate routine-source UI on the connection's databaseType capability
- Check connection_info compatibilityMode before offering routine features
- Default non-Inceptor connections to TABLE object sources
When it happens
Trigger: Calling get_object_source with object_type 'PROCEDURE' or 'FUNCTION' when the connection's DatabaseType is not one of argo/inceptor/inceptor2/transwarp (see supportsRoutines).
Common situations: UI sidebar showing a routines node for plain HiveServer2 connections; users clicking a function in a generic Hive connection; tooling that assumes all dialects expose routine DDL like Postgres does.
Related errors
- Hive does not support rollbackable transactions
- Object source requires database context for Hive/Inceptor ro
- Unsupported object_type for Hive/Inceptor routine source:
- Object source requires database context for Hive/Inceptor ob
- Hive host is required
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/6ce9f38c1f3a4b0d.
Report an issue: GitHub.