{"record":{"id":"cb26834af504e7bc","repo":"apache/seatunnel","slug":"option-selected-fields-is-deprecated-use-prope","errorCode":null,"errorMessage":"Option 'selected_fields' is deprecated. Use 'properties' within each mapping instead.","messagePattern":"Option 'selected_fields' is deprecated\\. Use 'properties' within each mapping instead\\.","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":138,"sourceCode":"                        .orElse(\n                                legacyConfig\n                                        ? true\n                                        : HugeGraphSinkOptions.DELETE_VERTEX_WITH_EDGES\n                                                .defaultValue()));\n        sinkConfig.setAllowCascadeDeleteUnmappedEdges(\n                config.getOptional(HugeGraphSinkOptions.ALLOW_CASCADE_DELETE_UNMAPPED_EDGES)\n                        .orElse(\n                                HugeGraphSinkOptions.ALLOW_CASCADE_DELETE_UNMAPPED_EDGES\n                                        .defaultValue()));\n        sinkConfig.setDataSaveMode(\n                config.getOptional(HugeGraphSinkOptions.DATA_SAVE_MODE)\n                        .orElse(HugeGraphSinkOptions.DATA_SAVE_MODE.defaultValue()));\n\n        // Deprecated fields (parse but warn)\n        config.getOptional(HugeGraphSinkOptions.SELECTED_FIELDS)\n                .ifPresent(\n                        fields -> {\n                            LOG.warn(\n                                    \"Option 'selected_fields' is deprecated. Use 'properties' within each mapping instead.\");\n                            sinkConfig.setSelectedFields(fields);\n                        });\n        config.getOptional(HugeGraphSinkOptions.IGNORED_FIELDS)\n                .ifPresent(\n                        fields -> {\n                            LOG.warn(\n                                    \"Option 'ignored_fields' is deprecated. Use 'properties' within each mapping instead.\");\n                            sinkConfig.setIgnoredFields(fields);\n                        });\n\n        return sinkConfig;\n    }\n\n    /**\n     * Converts legacy global field selection into the mapping property list. The old writer ignored\n     * {@code schema_config.properties} and wrote all fields after applying selected/ignored fields,\n     * so preserving that behavior requires the input row schema.","sourceCodeStart":120,"sourceCodeEnd":156,"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#L120-L156","documentation":"This is a deprecation warning emitted by HugeGraphSinkConfig.of() while parsing job config. The 'selected_fields' option is still parsed and applied (it sets selectedFields on the sink config) for backward compatibility, but new field selection is expressed via 'properties' inside each mapping entry. The warning tells you the config will break in a future release and how to migrate.","triggerScenarios":"A SeaTunnel HugeGraph sink job config contains the top-level option 'selected_fields' (HugeGraphSinkOptions.SELECTED_FIELDS); HugeGraphSinkConfig.of() reads it via config.getOptional and logs the warning before assigning it.","commonSituations":"Configs copied from old documentation or pre-migration examples; users upgrading from versions where field selection was a flat option rather than per-mapping 'properties'; mixed configs where some mappings already use 'properties' but the legacy option lingers.","solutions":["Remove 'selected_fields' from the sink config and declare the fields you want in the 'properties' map of each mapping entry (label -> field mapping).","If the behavior of the legacy option differs from what you need, explicitly map each desired SeaTunnel column to a HugeGraph property name inside mappings.","Verify the resulting vertex/edge property set with a small batch job; the deprecated option is applied only when present, so removal should not change output once mappings carry 'properties'."],"exampleFix":"// before\nsink {\n  HugeGraph {\n    selected_fields = [\"id\", \"name\"]\n  }\n}\n// after\nsink {\n  HugeGraph {\n    mappings = [\n      {\n        type = \"VERTEX\"\n        label = \"person\"\n        properties = {id = \"id\", name = \"name\"}\n      }\n    ]\n  }\n}","handlingStrategy":"validation","validationCode":"if (config.hasPath(\"selected_fields\")) {\n    throw new IllegalArgumentException(\"selected_fields is deprecated; declare fields in mappings[].properties instead\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use 'properties' inside each mapping entry instead of top-level field list options","Lint job configs against the current option registry to catch deprecated keys","Keep configs in version control and grep for legacy option names during upgrades"],"tags":["deprecation","config","hugegraph"],"backgroundTag":"deprecated-api-usage","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"}