{"record":{"id":"2ff75eefa05a3c22","repo":"alibaba/DataX","slug":"id-or-label-missed","errorCode":null,"errorMessage":"id or label missed","messagePattern":"id or label missed","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/mapping/DefaultGdbMapper.java","lineNumber":109,"sourceCode":"            if (rule.getImportType() == Key.ImportType.EDGE) {\n                final String to = forStrColumn(numPattern, rule.getTo()).apply(r);\n                final String from = forStrColumn(numPattern, rule.getFrom()).apply(r);\n                if (to == null || from == null) {\n                    log.error(\"invalid record to: {} , from: {}\", to, from);\n                    throw new IllegalArgumentException(\"to or from missed in edge\");\n                }\n                ((GdbEdge)e).setTo(to);\n                ((GdbEdge)e).setFrom(from);\n\n                // generate UUID for edge\n                if (id == null) {\n                    id = UUID.randomUUID().toString();\n                }\n            }\n\n            if (id == null || label == null) {\n                log.error(\"invalid record id: {} , label: {}\", id, label);\n                throw new IllegalArgumentException(\"id or label missed\");\n            }\n\n            e.setId(id);\n            e.setLabel(label);\n\n            properties.forEach(p -> p.accept(r, e));\n        };\n        return ret;\n    }\n\n    private static Function<Record, Object> forObjColumn(final boolean numPattern, final String rule, final ValueType type) {\n        final Pattern pattern = numPattern ? NORMAL_NUM_PATTERN : NORMAL_DOLLAR_PATTERN;\n        final Matcher m = pattern.matcher(rule);\n        if (m.matches()) {\n            final int index = Integer.valueOf(m.group(1));\n            return r -> type.applyColumn(r.getColumn(index));\n        } else {\n            return r -> type.fromStrFunc(rule);","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/mapping/DefaultGdbMapper.java#L91-L127","documentation":"DefaultGdbMapper requires every element to end with non-null id and label. For edges, a null id is auto-filled with a random UUID, but a null label is fatal; for vertices both id and label are required. If either is still null at the check, IllegalArgumentException is thrown with the invalid values logged.","triggerScenarios":"The record's id/label column resolves to null: source NULL values, wrong column index/name in the mapping, or label column missing from the reader's column projection entirely. For vertex import, a null id always lands here (UUID generation only applies to edges).","commonSituations":"Vertex jobs where the primary-key column has NULLs; label column name mismatch between reader and writer configs; column order shifts after adding a field upstream; blank strings are fine (non-null), so this is specifically about true nulls.","solutions":["Read the 'invalid record id: {}, label: {}' log line to see which field is null","Guarantee non-null id/label at the source or filter such rows in the reader","Cross-check reader column order and writer 'column' mapping (index/name) for the id and label entries","For edges only: leave id unmapped to get an auto-generated UUID if synthetic ids are acceptable"],"exampleFix":"// before: id column may be null\n// after: derive id via function or filter\nreader: \"where\": \"pk is not null\"","handlingStrategy":"validation","validationCode":"// reader-level guard: rows must carry id and label\n\"where\": \"pk IS NOT NULL AND type IS NOT NULL\"","typeGuard":null,"tryCatchPattern":"catch (IllegalArgumentException e) {\n    if (\"id or label missed\".equals(e.getMessage())) {\n        // vertex import: id cannot be auto-generated (only edge ids get UUIDs); supply or filter\n    }\n    throw e;\n}","preventionTips":["Remember: null edge ids get a UUID; null vertex ids do not — vertices always need an explicit id column","Verify label column exists in the reader projection and is never null"],"tags":["gdb","graph","mapping","required-field","datax"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}