apache/seatunnel · error · NebulaGraphConnectorException

INVALID_CONFIG

INVALID_CONFIG

Error message

NebulaGraph tag and property names must contain only letters, digits, or underscores and must not start with a digit: ${identifier}

What it means

validateIdentifier() enforces that NebulaGraph tag and property names match a strict identifier pattern (letters, digits, underscores, not starting with a digit). quoteIdentifier() wraps the validated name in backticks for nGQL; anything else (null, spaces, hyphens, leading digits, special characters) raises NebulaGraphConnectorException with INVALID_CONFIG because such names would break or inject into generated statements.

Solutions

  1. Rename the Nebula tag/property (or map the column) so it matches [A-Za-z_][A-Za-z0-9_]*
  2. Add a transform to alias offending source columns to valid identifier names before the sink
  3. Quote-compliant names cannot bypass the check — the pattern is mandatory; do not attempt backticks in the config value
  4. Fix null identifiers by correcting the config key holding the name

Example fix

// before
sink = { NebulaGraph { tag = "user-profile" ... } }
// after
sink = { NebulaGraph { tag = "user_profile" ... } } // or rename via transform
Defensive patterns

Strategy: validation

Validate before calling

static final Pattern ID = Pattern.compile("[A-Za-z_][A-Za-z0-9_]*"); boolean ok = ID.matcher(name).matches();

Type guard

String safeIdentifier(String n) { return (n != null && Pattern.compile("[A-Za-z_][A-Za-z0-9_]*").matcher(n).matches()) ? n : null; }

Try / catch

try { sink.write(row); } catch (NebulaGraphConnectorException e) { if (e.getMessage().startsWith("NebulaGraph tag and property names")) { /* fix config and resubmit */ } throw e; }

Prevention

When it happens

Trigger: Configuring the NebulaGraph sink with a tag/property name containing characters outside [A-Za-z0-9_] or starting with a digit, e.g. tag "user-profile", property "2fa-enabled", or a name read from a wrong config key (null).

Common situations: Mapping source column names with hyphens or spaces directly to Nebula properties; column names that start with digits (e.g. '2024_revenue'); typos or misaligned config keys producing null identifiers.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/6d315149c6764fa5. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphStatementBuilder.java:166

                    break;
                default:
                    if (Character.isISOControl(character)) {
                        throw new IllegalArgumentException(
                                "NebulaGraph string vertex IDs must not contain unsupported control characters.");
                    }
                    escaped.append(character);
            }
        }
        return escaped.append('"').toString();
    }

    private static String quoteIdentifier(String identifier) {
        return "`" + validateIdentifier(identifier) + "`";
    }

    private static String validateIdentifier(String identifier) {
        if (identifier == null || !IDENTIFIER.matcher(identifier).matches()) {
            throw new NebulaGraphConnectorException(
                    NebulaGraphConnectorErrorCode.INVALID_CONFIG,
                    "NebulaGraph tag and property names must contain only letters, digits, or underscores and must not start with a digit: "
                            + identifier);
        }
        return identifier;
    }
}

View on GitHub (pinned to cf67b549a7)