{"record":{"id":"7e8c0b73d6d46a7c","repo":"xai-org/x-algorithm","slug":"dataset-dataset-does-not-match-datasetregex","errorCode":null,"errorMessage":"Dataset '$dataset' does not match $datasetRegex.","messagePattern":"Dataset '\\$dataset' does not match \\$datasetRegex\\.","errorType":"validation","errorClass":"ConfigFailure","httpStatus":null,"severity":"error","filePath":"botmaker/src/scala/com/twitter/botmaker/runtime/config/ServiceConfigs.scala","lineNumber":97,"sourceCode":"    if (funcNameRegex.findFirstIn(funcName).isEmpty) {\n      throw ConfigFailure(\n        s\"Func name '$funcName' does not match $funcNameRegex.\"\n      )\n    }\n  }\n\n  def validateEndpoint(endpoint: String): Unit = {\n    if (endpoint != \"ScribeClient\"\n      && endpointRegex.findFirstIn(endpoint).isEmpty) {\n      throw ConfigFailure(\n        s\"Endpoint '$endpoint' does not match $endpointRegex.\"\n      )\n    }\n  }\n\n  def validateDataset(dataset: String): Unit = {\n    if (datasetRegex.findFirstIn(dataset).isEmpty) {\n      throw ConfigFailure(\n        s\"Dataset '$dataset' does not match $datasetRegex.\"\n      )\n    }\n  }\n\n  def validateTypeName(typename: String): Unit = {\n    if (typeNameRegex.findFirstIn(typename).isEmpty) {\n      throw ConfigFailure(\n        s\"TypeName '$typename' does not match $typeNameRegex.\"\n      )\n    }\n  }\n\n  def validateTeamName(teamName: String): Unit = {\n    if (teamNameRegex.findFirstIn(teamName).isEmpty) {\n      throw ConfigFailure(\n        s\"Team name '$teamName' does not match $teamNameRegex.\"\n      )","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/src/scala/com/twitter/botmaker/runtime/config/ServiceConfigs.scala#L79-L115","documentation":"Dataset names in BotMaker configs must match datasetRegex. validateDataset throws ConfigFailure including the dataset string and pattern when a referenced dataset identifier fails validation.","triggerScenarios":"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.","commonSituations":"Using full table paths (namespace/dataset/table) where only the dataset name is expected; environment-prefixed dataset names; trailing whitespace from config files.","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"],"exampleFix":"// before\ndataset(\"analytics/ContentScan/daily\")\n\n// after\ndataset(\"content_scan_daily\")","handlingStrategy":"type-guard","validationCode":"DATASET_RE = re.compile(r'^[a-z][a-z0-9_]*$')  # mirror datasetRegex\ndef validDataset(d): return bool(DATASET_RE.match(d.strip()))","typeGuard":"def isValidDataset(name: str) -> bool:\n    return bool(re.match(r'^[a-z][a-z0-9_]*$', name))","tryCatchPattern":null,"preventionTips":["Strip table paths down to the dataset identifier","Trim config-sourced strings"],"tags":["botmaker","scala","dataset","naming-convention","config-validation"],"backgroundTag":"identifier-validation-failed","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}