OpenRefine/OpenRefine · error · IllegalArgumentException
Inconsistent number of properties fetched and of result…
Error message
Inconsistent number of properties fetched and of result column names
What it means
The ExtendDataOperation constructor validates that the number of properties in the column extension matches the number of supplied result column names, since each fetched property maps to exactly one new column. A mismatch throws an IllegalArgumentException in the constructor.
Solutions
- Make resultColumnNames contain exactly one name per property in the extension, in the same order
- Regenerate the operation via the 'Add columns from reconciled values' dialog instead of editing JSON
- If using the deprecated legacy constructor, migrate to the constructor/API that takes explicit column names
- Count extension.properties and adjust resultColumnNames to the same length
Example fix
// before: 2 properties, 1 name
new ExtendDataOperation(base, "wd:Q1", ids, schema, ext(2 props), 1, List.of("name"))
// after
new ExtendDataOperation(base, "wd:Q1", ids, schema, ext(2 props), 1, List.of("name","birthdate")) Defensive patterns
Strategy: validation
Validate before calling
if (extension.properties.length !== resultColumnNames.length) {
throw new Error('resultColumnNames must have one entry per extension property');
} Try / catch
try {
ExtendDataOperation op = new ExtendDataOperation(...);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("Inconsistent number of properties")) {
// fix the column name list
}
} Prevention
- Build resultColumnNames from the same loop that builds extension.properties
- Never add a property to exported JSON without adding the matching column name
- Prefer the dialog-generated JSON over hand edits
- Migrate away from the deprecated legacy constructor
When it happens
Trigger: Constructing ExtendDataOperation (or deserializing it from operation JSON) where extension.properties.length != resultColumnNames.length, e.g. hand-editing the JSON to add properties without updating column names.
Common situations: Writing 'Add columns from reconciled values' operations programmatically; editing exported operation JSON to add a property to fetch; upgrading legacy operations that used the deprecated no-names constructor.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Cannot manually set judgment to 'error'
- Cannot manually set judgment to 'error'
- Creation of column ' ' conflicts with an existing column…
- Input strings cannot be empty
- Invalid expression
AI-assisted analysis of OpenRefine/OpenRefine@a946177e04 (2026-09-08).
Data as JSON: /api/errors/9dd8ccd3b980c6a1.
Report an issue: GitHub.
Appendix: source
Thrown at main/src/com/google/refine/operations/recon/ExtendDataOperation.java:112
@JsonProperty("engineConfig") EngineConfig engineConfig,
@JsonProperty("baseColumnName") String baseColumnName,
@JsonProperty("endpoint") String endpoint,
@JsonProperty("identifierSpace") String identifierSpace,
@JsonProperty("schemaSpace") String schemaSpace,
@JsonProperty("extension") DataExtensionConfig extension,
@JsonProperty("columnInsertIndex") int columnInsertIndex,
@JsonProperty("resultColumnNames") List<String> resultColumnNames) {
super(engineConfig);
_baseColumnName = baseColumnName;
_endpoint = endpoint;
_identifierSpace = identifierSpace;
_schemaSpace = schemaSpace;
_extension = extension;
_columnInsertIndex = columnInsertIndex;
_resultColumnNames = resultColumnNames;
if (_resultColumnNames != null && _extension.properties.size() != _resultColumnNames.size()) {
throw new IllegalArgumentException("Inconsistent number of properties fetched and of result column names");
}
}
/**
* @deprecated legacy constructor: supply column names instead
*/
@Deprecated(since = "3.9")
public ExtendDataOperation(
EngineConfig engineConfig,
String baseColumnName,
String endpoint,
String identifierSpace,
String schemaSpace,
DataExtensionConfig extension,
int columnInsertIndex) {
this(engineConfig, baseColumnName, endpoint, identifierSpace, schemaSpace, extension, columnInsertIndex, null);
}
View on GitHub (pinned to a946177e04)