{"record":{"id":"2c7f83edc0ee6867","repo":"apache/beam","slug":"unsupported-file-pattern-only-file-patterns-with-gs-schema","errorCode":null,"errorMessage":"Unsupported file pattern. Only file patterns with 'gs://' schema are supported at the moment.","messagePattern":"Unsupported file pattern\\. Only file patterns with 'gs://' schema are supported at the moment\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/GcsTableFactory.java","lineNumber":49,"sourceCode":"  @Override\n  public Optional<Table.Builder> tableBuilder(Entry entry) {\n    if (!entry.hasGcsFilesetSpec()) {\n      return Optional.empty();\n    }\n\n    GcsFilesetSpec gcsFilesetSpec = entry.getGcsFilesetSpec();\n    List<String> filePatterns = gcsFilesetSpec.getFilePatternsList();\n\n    // We support exactly one 'file_patterns' field and nothing else at the moment\n    if (filePatterns.size() != 1) {\n      throw new UnsupportedOperationException(\n          \"Unable to parse GCS entry '\" + entry.getName() + \"'\");\n    }\n\n    String filePattern = filePatterns.get(0);\n\n    if (!filePattern.startsWith(\"gs://\")) {\n      throw new UnsupportedOperationException(\n          \"Unsupported file pattern. \"\n              + \"Only file patterns with 'gs://' schema are supported at the moment.\");\n    }\n\n    return Optional.of(\n        Table.builder()\n            .type(\"text\")\n            .location(filePattern)\n            .properties(TableUtils.emptyProperties())\n            .comment(\"\"));\n  }\n}\n","sourceCodeStart":31,"sourceCodeEnd":62,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/GcsTableFactory.java#L31-L62","documentation":"GcsTableFactory.tableBuilder throws this when the single file pattern in the Data Catalog entry's GCS fileset spec does not start with 'gs://'. Only Google Cloud Storage patterns are supported by this provider.","triggerScenarios":"tableBuilder receives a filePattern whose value does not begin with 'gs://', e.g. 's3://bucket/x' or a bare path '/data/x.json'.","commonSituations":"Entries authored for another storage system, local paths pasted into file_patterns, or a URI missing the gs:// scheme.","solutions":["Change the entry's file pattern to a gs:// URI, e.g. gs://bucket/path/*.json","Verify the file pattern string in the Data Catalog entry has no leading whitespace or wrong scheme","Use a different Beam SQL provider if the data is not on GCS"],"exampleFix":"// before\nfile_patterns: ['/data/events/*.json']\n// after\nfile_patterns: ['gs://my-bucket/data/events/*.json']","handlingStrategy":"validation","validationCode":"String p = entry.getGcsFilesetSpec().getFilePatterns(0);\nif (!p.startsWith(\"gs://\")) throw new IllegalArgumentException(\"Pattern must start with gs://: \" + p);","typeGuard":"static boolean isGcsPattern(String p) { return p != null && p.startsWith(\"gs://\"); }","tryCatchPattern":"try {\n  Table t = gcsFactory.tableBuilder(entry).get();\n} catch (UnsupportedOperationException ex) {\n  LOG.error(\"Only gs:// patterns supported\", ex);\n}","preventionTips":["Always use fully qualified gs:// URIs in file_patterns","Add entry-creation linting that rejects non-gs:// schemes","Convert other-cloud paths to GCS (or a different provider) before cataloging"],"tags":["datacatalog","gcs","file-pattern"],"backgroundTag":"invalid-url-format","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}