{"record":{"id":"d95b0c6974693750","repo":"apache/seatunnel","slug":"both-mappings-and-schema-config-are-present","errorCode":null,"errorMessage":"Both 'mappings' and 'schema_config' are present. 'schema_config' will be ignored. Please migrate to 'mappings'.","messagePattern":"Both 'mappings' and 'schema_config' are present\\. 'schema_config' will be ignored\\. Please migrate to 'mappings'\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSinkConfig.java","lineNumber":184,"sourceCode":"        } else {\n            effectiveFields = new ArrayList<>(Arrays.asList(rowType.getFieldNames()));\n            if (ignoredFields != null && !ignoredFields.isEmpty()) {\n                Set<String> ignored = new HashSet<>(ignoredFields);\n                effectiveFields.removeIf(ignored::contains);\n            }\n        }\n        mappings.get(0).setProperties(effectiveFields);\n    }\n\n    private static List<MappingConfig> resolveMappings(\n            ReadonlyConfig config, HugeGraphSinkConfig sinkConfig) {\n        boolean hasMappings = config.getOptional(HugeGraphSinkOptions.MAPPINGS).isPresent();\n        boolean hasSchemaConfig =\n                config.getOptional(HugeGraphSinkOptions.SCHEMA_CONFIG).isPresent();\n\n        if (hasMappings) {\n            if (hasSchemaConfig) {\n                LOG.warn(\n                        \"Both 'mappings' and 'schema_config' are present. \"\n                                + \"'schema_config' will be ignored. Please migrate to 'mappings'.\");\n            }\n            return config.get(HugeGraphSinkOptions.MAPPINGS);\n        }\n\n        if (hasSchemaConfig) {\n            SchemaConfig schemaConfig = config.get(HugeGraphSinkOptions.SCHEMA_CONFIG);\n            sinkConfig.setSchemaConfig(schemaConfig);\n            return Collections.singletonList(MappingConfig.fromLegacySchemaConfig(schemaConfig));\n        }\n\n        throw new HugeGraphConnectorException(\n                HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                \"Either 'mappings' or 'schema_config' must be specified. \"\n                        + \"'mappings' is the recommended option.\");\n    }\n","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSinkConfig.java#L166-L202","documentation":"This warning is raised by HugeGraphSinkConfig.resolveMappings() when a job config supplies both the new 'mappings' option and the legacy 'schema_config' option. The connector prefers 'mappings' and silently discards 'schema_config'; the warning makes the ignored legacy block visible so users are not surprised that schema_config settings have no effect.","triggerScenarios":"HugeGraph sink config contains both HugeGraphSinkOptions.MAPPINGS and HugeGraphSinkOptions.SCHEMA_CONFIG; resolveMappings() (called from of()) detects both present and logs that schema_config will be ignored.","commonSituations":"Partially migrated configs where the schema_config block was left in place after adding mappings; copied examples combining old and new syntax; operators unsure which option wins and leaving both 'just in case'.","solutions":["Delete the 'schema_config' block from the sink config, keeping only 'mappings'.","If schema_config carried settings not yet expressed in mappings (labels, id strategy, properties), port them into the corresponding mapping entries first.","Re-run the job and confirm the graph schema in HugeGraph matches expectations."],"exampleFix":"// before\nsink {\n  HugeGraph {\n    schema_config = {...}\n    mappings = [{type = \"VERTEX\", label = \"person\", properties = {id = \"id\"}}]\n  }\n}\n// after\nsink {\n  HugeGraph {\n    mappings = [{type = \"VERTEX\", label = \"person\", id_strategy = \"PRIMARY_KEY\", properties = {id = \"id\"}}]\n  }\n}","handlingStrategy":"validation","validationCode":"if (config.hasPath(\"mappings\") && config.hasPath(\"schema_config\")) {\n    throw new IllegalArgumentException(\"Only one of 'mappings' or 'schema_config' may be set; prefer 'mappings'\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep only one mapping syntax in a config; delete schema_config after migrating to mappings","Port all schema_config settings (labels, id strategy, properties) into mapping entries before removing it","Add a CI check that flags configs containing both options"],"tags":["config","conflict","hugegraph","deprecation"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}