xai-org/x-algorithm · error · ConfigFailure
Dataset '$dataset' does not match $datasetRegex.
Error message
Dataset '$dataset' does not match $datasetRegex.
What it means
Dataset names in BotMaker configs must match datasetRegex. validateDataset throws ConfigFailure including the dataset string and pattern when a referenced dataset identifier fails validation.
Source
Thrown at botmaker/src/scala/com/twitter/botmaker/runtime/config/ServiceConfigs.scala:97
if (funcNameRegex.findFirstIn(funcName).isEmpty) {
throw ConfigFailure(
s"Func name '$funcName' does not match $funcNameRegex."
)
}
}
def validateEndpoint(endpoint: String): Unit = {
if (endpoint != "ScribeClient"
&& endpointRegex.findFirstIn(endpoint).isEmpty) {
throw ConfigFailure(
s"Endpoint '$endpoint' does not match $endpointRegex."
)
}
}
def validateDataset(dataset: String): Unit = {
if (datasetRegex.findFirstIn(dataset).isEmpty) {
throw ConfigFailure(
s"Dataset '$dataset' does not match $datasetRegex."
)
}
}
def validateTypeName(typename: String): Unit = {
if (typeNameRegex.findFirstIn(typename).isEmpty) {
throw ConfigFailure(
s"TypeName '$typename' does not match $typeNameRegex."
)
}
}
def validateTeamName(teamName: String): Unit = {
if (teamNameRegex.findFirstIn(teamName).isEmpty) {
throw ConfigFailure(
s"Team name '$teamName' does not match $teamNameRegex."
)View on GitHub (pinned to 24c60942c5)
Solutions
- Extract just the dataset identifier component and pass that
- Check datasetRegex in ServiceConfigs for allowed charset (typically lowercase alphanumerics with limited punctuation) and conform
- Trim whitespace on values read from config files
Example fix
// before
dataset("analytics/ContentScan/daily")
// after
dataset("content_scan_daily") Defensive patterns
Strategy: type-guard
Validate before calling
DATASET_RE = re.compile(r'^[a-z][a-z0-9_]*$') # mirror datasetRegex def validDataset(d): return bool(DATASET_RE.match(d.strip()))
Type guard
def isValidDataset(name: str) -> bool:
return bool(re.match(r'^[a-z][a-z0-9_]*$', name)) Prevention
- Strip table paths down to the dataset identifier
- Trim config-sourced strings
When it happens
Trigger: Passing a dataset name that does not match datasetRegex to a config that validates datasets — e.g. names with uppercase letters, slashes, spaces, or empty string depending on the exact regex.
Common situations: Using full table paths (namespace/dataset/table) where only the dataset name is expected; environment-prefixed dataset names; trailing whitespace from config files.
Related errors
- Event type '$eventType' does not match $eventTypeRegex.
- Field name '$fieldName' does not match $fieldNameRegex.
- Func name '$funcName' does not match $funcNameRegex.
- Endpoint '$endpoint' does not match $endpointRegex.
- TypeName '$typename' does not match $typeNameRegex.
AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28).
Data as JSON: /api/errors/7e8c0b73d6d46a7c.
Report an issue: GitHub.