{"record":{"id":"50320011de93cdd4","repo":"apache/beam","slug":"table-path-must-be-set","errorCode":null,"errorMessage":"Table path must be set.","messagePattern":"Table path must be set\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/DeltaIO.java","lineNumber":136,"sourceCode":"    }\n\n    public ReadRows withVersion(@Nullable Long version) {\n      return toBuilder().setVersion(version).build();\n    }\n\n    public ReadRows withTimestamp(@Nullable String timestamp) {\n      return toBuilder().setTimestamp(timestamp).build();\n    }\n\n    public ReadRows withConfig(Map<String, String> config) {\n      return toBuilder().setHadoopConfig(config).build();\n    }\n\n    @Override\n    public PCollection<Row> expand(PBegin input) {\n      String path = getTablePath();\n      if (path == null) {\n        throw new IllegalArgumentException(\"Table path must be set.\");\n      }\n      if (getVersion() != null && getTimestamp() != null) {\n        throw new IllegalArgumentException(\"Cannot set both version and timestamp.\");\n      }\n\n      Configuration conf = new Configuration();\n      Map<String, String> hadoopConfig = getHadoopConfig();\n      if (hadoopConfig != null) {\n        for (Map.Entry<String, String> entry : hadoopConfig.entrySet()) {\n          conf.set(entry.getKey(), entry.getValue());\n        }\n      }\n      Engine engine = DefaultEngine.create(conf);\n      Table table = Table.forPath(engine, path);\n      Snapshot snapshot;\n      Long versionVal = getVersion();\n      String timestampVal = getTimestamp();\n      if (versionVal != null) {","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/DeltaIO.java#L118-L154","documentation":"DeltaIO.Read's expand() validates that a table path was configured via .from(path). Reading requires a Delta table location; with a null path the connector cannot build the table and throws IllegalArgumentException during pipeline expansion (at graph construction, before any data flows).","triggerScenarios":"Building a DeltaIO.read() transform and forgetting .from(\"/path/to/table\"), or calling toBuilder-style builders that cleared tablePath.","commonSituations":"Path supplied from a nullable config/option (e.g. an unset PipelineOption) that was never validated before expansion; copy-pasted builder where .from() was dropped.","solutions":["Call .from(\"<delta table path>\") on the read transform before applying it to the pipeline.","If the path comes from options, fail fast with a clear message when the option is absent (validate in your main before Pipeline.run).","Check builder chaining so later toBuilder()/build() calls don't reset tablePath to null."],"exampleFix":"// before\nDeltaIO.read().withVersion(5L).apply(...); // no .from()\n// after\nDeltaIO.read().from(\"s3://bucket/delta/table\").withVersion(5L).apply(...);","handlingStrategy":"validation","validationCode":"if (options.getDeltaTablePath() == null || options.getDeltaTablePath().isEmpty()) { throw new IllegalArgumentException(\"--deltaTablePath is required\"); }\nDeltaIO.read().from(options.getDeltaTablePath()).apply(...);","typeGuard":"static boolean hasPath(DeltaIO.Read read) { return read.getTablePath() != null; }","tryCatchPattern":"try { pipeline.run(); } catch (IllegalArgumentException e) { if (e.getMessage().equals(\"Table path must be set.\")) { printUsageAndExit(); } else { throw e; } }","preventionTips":["Always chain .from(path) immediately after DeltaIO.read().","Validate required pipeline options before Pipeline.run.","Centralize transform construction so path is never optional."],"tags":["java","delta-lake","missing-argument","pipeline-construction"],"backgroundTag":"missing-required-argument","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"}