{"record":{"id":"50bba2070b7c7511","repo":"apache/seatunnel","slug":"duplicated-transform-name-s-transform-names-mu","errorCode":null,"errorMessage":"Duplicated transform name '%s'. Transform names must be unique within a job.","messagePattern":"Duplicated transform name '(.+?)'\\. Transform names must be unique within a job\\.","errorType":"validation","errorClass":"JobDefineCheckException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java","lineNumber":540,"sourceCode":"        int spareParallelism = inputs.get(0)._2().getParallelism();\n        int parallelism =\n                DryRunSampleConfig.isEnabled(jobConfig.getEnvOptions())\n                        ? 1\n                        : readonlyConfig\n                                .getOptional(EnvCommonOptions.PARALLELISM)\n                                .orElse(spareParallelism);\n        SeaTunnelTransform<?> transform =\n                FactoryUtil.createAndPrepareMultiTableTransform(\n                        new ArrayList<>(catalogTables), readonlyConfig, classLoader, factoryId);\n\n        transform.setJobContext(jobConfig.getJobContext());\n        long id = idGenerator.getNextId();\n        String legacyActionName = JobConfigParser.createTransformActionName(index, factoryId);\n        String actionName = legacyActionName;\n        String configuredName = getOptionalName(config);\n        if (StringUtils.isNotBlank(configuredName)) {\n            if (!usedTransformNames.add(configuredName)) {\n                throw new JobDefineCheckException(\n                        String.format(\n                                \"Duplicated transform name '%s'. Transform names must be unique within a job.\",\n                                configuredName));\n            }\n            actionName = configuredName;\n        }\n\n        TransformAction transformAction =\n                new TransformAction(\n                        id,\n                        actionName,\n                        new ArrayList<>(inputActions),\n                        transform,\n                        jarUrls,\n                        new HashSet<>());\n        transformAction.setParallelism(parallelism);\n\n        List<Tuple2<CatalogTable, Action>> actions = new ArrayList<>();","sourceCodeStart":522,"sourceCodeEnd":558,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java#L522-L558","documentation":"Thrown by parseTransform when a transform explicitly sets a 'name' (plugin_name-level name option) that duplicates a name already used by another transform in the same job. Transform names are used to build the DAG and connect edges, so they must be unique within a job.","triggerScenarios":"Two or more transform blocks in one job config both define the same non-blank name via getOptionalName(config) (the transform's name option), during parseTransforms.","commonSituations":"Copy-pasting a transform block (e.g. two SQL or FieldMapper transforms) and forgetting to change its name; generated configs templated without unique names.","solutions":["Give each transform a distinct name option value.","If names are not needed for edges, remove the name option so the parser uses the auto-generated legacy action name.","Check copy-pasted transform blocks for duplicated names."],"exampleFix":"// before\ntransform {\n  Sql { name = \"t1\" ... }\n  Sql { name = \"t1\" ... }\n}\n// after\ntransform {\n  Sql { name = \"filter-orders\" ... }\n  Sql { name = \"enrich-users\" ... }\n}","handlingStrategy":"validation","validationCode":"Set<String> names = new HashSet<>();\nfor (TransformConfig t : transforms) {\n  String n = t.getName();\n  if (n != null && !names.add(n)) throw new IllegalArgumentException(\"Duplicate transform name: \" + n);\n}","typeGuard":null,"tryCatchPattern":"try {\n  engine.submitJob(config);\n} catch (JobDefineCheckException e) {\n  if (e.getMessage().startsWith(\"Duplicated transform name\")) {\n    // rename the offending transform's name option and resubmit\n  }\n}","preventionTips":["Adopt a naming convention (stage-purpose, e.g. sql-filter-orders) for transforms","Lint generated configs for duplicate names before submission","Avoid copy-pasting transform blocks without renaming"],"tags":["job-parsing","naming","duplicate-identifier","config-validation"],"backgroundTag":"duplicate-identifier","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}