{"record":{"id":"c8c135df80a33ca8","repo":"apache/seatunnel","slug":"field-data-is-inconsistent","errorCode":"FIELD_DATA_IS_INCONSISTENT","errorMessage":"Paths have different array parents. Expected '%s' but found path starting with '%s'","messagePattern":"Paths have different array parents\\. Expected '(.+?)' but found path starting with '(.+?)'","errorType":"error_code","errorClass":"HttpConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/util/ArrayJsonPathProcessor.java","lineNumber":61,"sourceCode":"        // Get all paths as strings\n        String[] pathStrings = new String[paths.length];\n        for (int i = 0; i < paths.length; i++) {\n            pathStrings[i] = paths[i].getPath();\n        }\n\n        String firstPath = pathStrings[0];\n        int arrayPos = firstPath.indexOf(\"[*]\");\n\n        if (arrayPos == -1) {\n            return null; // Not an array path, cannot process\n        }\n\n        String parentPath = firstPath.substring(0, arrayPos + 3);\n\n        // Verify all other paths have the same parent\n        for (int i = 1; i < pathStrings.length; i++) {\n            if (!pathStrings[i].startsWith(parentPath)) {\n                throw new HttpConnectorException(\n                        HttpConnectorErrorCode.FIELD_DATA_IS_INCONSISTENT,\n                        String.format(\n                                \"Paths have different array parents. Expected '%s' but found path starting with '%s'\",\n                                parentPath, pathStrings[i]));\n            }\n        }\n\n        return parentPath;\n    }\n\n    /**\n     * Get a relative path based on a parent path and a full path.\n     *\n     * @param parentPath The parent path\n     * @param fullPath The complete path\n     * @return The relative path from parent to full path\n     */\n    private String getRelativePath(String parentPath, String fullPath) {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/util/ArrayJsonPathProcessor.java#L43-L79","documentation":"ArrayJsonPathProcessor.extractCommonParentPath computes a common array parent path (ending in [*]) from all configured JsonPaths. If any subsequent path does not start with that computed parent, the data layout is considered inconsistent and FIELD_DATA_IS_INCONSISTENT is thrown.","triggerScenarios":"json_field paths where not all paths share the same array parent, e.g. $.store.book[*].title and $.store.car[*].name — the second path diverges from the parent derived from the first.","commonSituations":"Users configuring fields that come from different arrays or from a scalar sibling alongside array fields, expecting the processor to flatten them together.","solutions":["Make all json_field paths share a common [*] array parent (e.g. $.data.items[*].a and $.data.items[*].b)","Remove or move paths that do not belong under the common array parent","If fields are in different arrays, use separate sources/transforms or a different processor"],"exampleFix":"// before\njson_field = { path = [\"$.store.book[*].title\", \"$.store.car[*].name\"] }\n// after\njson_field = { path = [\"$.store.book[*].title\", \"$.store.book[*].price\"] }","handlingStrategy":"validation","validationCode":"Set<String> parents = Arrays.stream(paths).map(p -> p.getPath().split(\"\\\\[\\\\*\\\\]\")[0]).collect(Collectors.toSet()); if (parents.size() != 1) throw new IllegalArgumentException(\"All paths must share one [*] parent\");","typeGuard":null,"tryCatchPattern":"try { processor.processJsonData(ctx, jsonPaths); } catch (HttpConnectorException e) { if (\"FIELD_DATA_IS_INCONSISTENT\".equals(e.getErrorCode().getCode())) { /* fix json_field paths */ } throw e; }","preventionTips":["Derive all field paths from the same array element in the API response","Test json_field against a sample response body before deploying","Avoid mixing scalar siblings with array element fields"],"tags":["jsonpath","config","array"],"backgroundTag":"invalid-config-value","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"}