t8y2/dbx · error · IllegalArgumentException
Databend procedure names with special characters are not sup
Error message
Databend procedure names with special characters are not supported: {name} What it means
DatabendAgent only supports procedures whose names are simple identifiers (letters, digits, underscores, not starting with a digit). simpleProcedureName validates the name against the regex [A-Za-z_][A-Za-z0-9_]* and throws IllegalArgumentException when it doesn't match, because describeProcedure/buildProcedureSource cannot safely handle quoted or special-character identifiers.
Source
Thrown at agents/drivers/databend/src/main/java/com/dbx/agent/databend/DatabendAgent.java:208
String body = properties.getOrDefault("body", "").trim();
StringBuilder source = new StringBuilder();
source.append("CREATE PROCEDURE ").append(simpleProcedureName(name)).append("(").append(String.join(", ", arguments)).append(")");
if (!returns.isEmpty()) {
source.append("\nRETURNS ").append(returns);
}
source.append("\nLANGUAGE ").append(language);
if (procedure.comment != null && !procedure.comment.isEmpty()) {
source.append("\nCOMMENT = '").append(procedure.comment.replace("'", "''")).append("'");
}
source.append("\nAS $$\n").append(body).append("\n$$;");
return source.toString();
}
private static String simpleProcedureName(String name) {
if (name != null && name.matches("[A-Za-z_][A-Za-z0-9_]*")) {
return name;
}
throw new IllegalArgumentException("Databend procedure names with special characters are not supported: " + name);
}
private static List<String> inputTypesFromArguments(String arguments) {
if (arguments == null) {
return Collections.emptyList();
}
int open = arguments.indexOf('(');
if (open < 0) {
return Collections.emptyList();
}
int close = matchingParen(arguments, open);
if (close < 0) {
return Collections.emptyList();
}
return splitTopLevel(arguments.substring(open + 1, close));
}
private static List<String> signatureNames(String signature) {View on GitHub (pinned to c0390bff16)
Solutions
- Rename the procedure to a simple identifier (letters, digits, underscores) and fetch it again.
- Pass the bare procedure name without schema prefix or quoting characters.
- If the special-character name must be kept, extend the driver to handle quoted identifiers, or retrieve the source with an equivalent SHOW CREATE PROCEDURE call manually.
- Reject or skip such procedures in tooling before calling getObjectSource.
Example fix
// before agent.getObjectSource(conn, schema, "daily-rollup", "PROCEDURE"); // after agent.getObjectSource(conn, schema, "daily_rollup", "PROCEDURE"); // renamed to a simple identifier
Defensive patterns
Strategy: validation
Validate before calling
// Java (caller side)
private static boolean isSimpleProcedureName(String name) {
return name != null && name.matches("[A-Za-z_][A-Za-z0-9_]*");
}
if (!isSimpleProcedureName(procedureName)) {
throw new IllegalArgumentException("Use a simple identifier: " + procedureName);
}
ObjectSource src = agent.getObjectSource(conn, schema, procedureName, "PROCEDURE"); Try / catch
try {
src = agent.getObjectSource(conn, schema, name, "PROCEDURE");
} catch (IllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("special characters")) {
throw new UnsupportedOperationException(
"Procedure \"" + name + "\" needs a simple identifier for source extraction", e);
} else { throw e; }
} Prevention
- Adopt a naming convention of letters, digits, and underscores for all Databend procedures.
- Validate identifiers against [A-Za-z_][A-Za-z0-9_]* in CI before deploying or extracting sources.
- Strip any schema prefixes or quoting characters before passing names to the agent.
- Treat procedures with special-character names as unsupported and handle them with raw SQL manually.
When it happens
Trigger: Calling getObjectSource for a Databend procedure whose name contains characters outside [A-Za-z0-9_] (spaces, dashes, dots, unicode) or starts with a digit; null names are also rejected.
Common situations: Procedures created with quoted/backtick identifiers like `daily-rollup` or `2024 report`; names generated by migration tools with hyphens; names containing schema prefixes or dots passed by mistake.
Related errors
- Agent runtime thread limits must be positive
- Procedure not found: {name}
- Unsupported object type: null
- Unsupported H2 driver profile: " + profile
- offsets must be an array
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/7ed1cd48bcbc5a73.
Report an issue: GitHub.