{"record":{"id":"88a0ca3768df787c","repo":"OpenRefine/OpenRefine","slug":"column-columnname-is-referenced-in-the-l","errorCode":null,"errorMessage":"Column '\" + columnName + \"' is referenced in the list of operations but is absent from the project","messagePattern":"Column '\" \\+ columnName \\+ \"' is referenced in the list of operations but is absent from the project","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"main/src/com/google/refine/commands/history/ApplyOperationsCommand.java","lineNumber":117,"sourceCode":"                        .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));\n            }\n\n            Recipe recipe = ParsingUtilities.mapper.readValue(jsonString, Recipe.class);\n            recipe.validate();\n            if (!renames.isEmpty()) {\n                recipe = recipe.renameColumns(renames);\n            }\n\n            // deduplicate internal column names to make sure they don't conflict with the ones in the project\n            if (!recipe.getInternalColumns().isEmpty()) {\n                recipe = recipe.avoidInternalColumnCollisions(project.columnModel.getColumnNames().stream().collect(Collectors.toSet()));\n            }\n\n            // check all required columns are present\n            Set<String> requiredColumns = recipe.getRequiredColumns();\n            for (String columnName : requiredColumns) {\n                if (project.columnModel.getColumnByName(columnName) == null) {\n                    throw new IllegalArgumentException(\n                            \"Column '\" + columnName + \"' is referenced in the list of operations but is absent from the project\");\n                }\n            }\n\n            // check all new columns are not present\n            Set<String> newColumns = recipe.getNewColumns();\n            for (String columnName : newColumns) {\n                if (project.columnModel.getColumnByName(columnName) != null) {\n                    throw new IllegalArgumentException(\n                            \"Column '\" + columnName + \"' already exists in the project\");\n                }\n            }\n\n            // Run all operations in sequence\n            List<HistoryEntry> entries = new ArrayList<>(recipe.getOperations().size());\n            for (AbstractOperation operation : recipe.getOperations()) {\n                Process process = operation.createProcess(project, new Properties());\n                HistoryEntry entry = project.processManager.queueProcess(process);","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/OpenRefine/OpenRefine/blob/a946177e049f3b0644261661db36cbb0c81ccf8a/main/src/com/google/refine/commands/history/ApplyOperationsCommand.java#L99-L135","documentation":"ApplyOperationsCommand.doPost() validates an uploaded operations recipe against the project schema before applying it. If recipe.getRequiredColumns() names a column that does not exist in project.columnModel, it throws IllegalArgumentException so the whole batch is rejected rather than failing mid-application.","triggerScenarios":"POSTing a JSON operations list to /command/core/apply-operations where an operation (e.g. a column edit or key-value columnize) references a column absent from the current project — often because the recipe came from a different project or the column was renamed/deleted.","commonSituations":"Reusing exported operation JSON across projects; applying recipes to a dataset with different headers; column renames upstream of the recipe; recording on one file and replaying on another.","solutions":["Open the recipe JSON and remove or fix operations referencing the missing column","Rename/rename the target column in the project to match the recipe, or adjust the recipe's column names","Regenerate the recipe from a project with the same schema","Check requiredColumns in the response error to see exactly which column is missing"],"exampleFix":"// before: recipe references column 'country' but project has 'Country'\n{\"op\":\"core/column-addition\",\"columnName\":\"country\",...}\n// after: fix name to match project schema\n{\"op\":\"core/column-addition\",\"columnName\":\"Country\",...}","handlingStrategy":"try-catch","validationCode":"// before POST\nrecipe.requiredColumns.forEach(c => { if (!projectColumns.includes(c)) throw new Error('missing column: ' + c); });","typeGuard":null,"tryCatchPattern":"try { applyOperations(recipe); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"absent from the project\")) { reconcileSchema(recipe, project); } }","preventionTips":["Only reuse recipes between projects with identical schemas","Check requiredColumns against the target project first","Re-record recipes after column renames"],"tags":["java","http-command","operations-recipe","column-missing"],"backgroundTag":"resource-not-found","analyzedSha":"a946177e049f3b0644261661db36cbb0c81ccf8a","analyzedAt":"2026-09-08T10:21:27.735Z","contentChangedAt":"2026-09-08T10:21:27.735Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}