| : Merge File Fails to Create New Column [message #2448] |
Mon, 24 November 2025 16:43  |
maz
Messages: 1 Registered: November 2025
|
Junior Member |
|
|
Summary:
When using the File > Merge File... function to merge an incoming file (File 2) with an existing file (File 1), if the merge key (Structure) results in a 100% match (all incoming structures are found in the existing file), any incoming columns explicitly mapped as <new column> with the replace with new option are not created or populated in the resulting table.
A workaround was discovered: Manually adding a single, empty column to the existing file (File 1) immediately before running the merge operation resolves the issue, allowing all new columns to be created and populated correctly. This suggests a potential issue in the column structure update trigger when a merge results only in cell updates and no new rows.
1. Environment Details
DataWarrior Version: v06.05.02
Operating System: Windows 11
2. Steps to Reproduce
A. Initial Merge (Failure)
Start Files: Prepare two DataWarrior files (File 1 - existing data, and File 2 - incoming data).
File 2 must contain a column that is not present in File 1 (e.g., "Assign Reagent Vendor").
Ensure all structures in File 2 are already present in File 1 (a 100% structural match is expected).
Initiate Merge: Open File 1. Go to File > Merge File... and select File 2.
Configure Merge Dialog: Set the merge options as follows:
Merge Key: Assign Structure mapped to Structure with option as merge key.
New Column (Failure Point): The incoming column (e.g., Assign Reagent Vendor) is mapped to <new column> with the merge option replace with new. (See screenshot reference: image_a1152a.png).
Execute: Run the merge.
Observed Failure: The resulting table shows the existing columns updated (proving the structure match worked), but the new column (e.g., "Assign Reagent Vendor") is not created or visible.
B. Workaround and Successful Merge
Prepare File 1: Undo the failed merge, or close and re-open the original File 1.
Apply Workaround: Go to Edit > Add Column > Empty Column and add a new, generic column to File 1 (e.g., named "Temp").
Initiate Merge: Repeat the merge process (Step 2.A.2).
Configure Merge Dialog: Use the exact same settings as before (Structure as merge key; new columns set to <new column> and replace with new).
Observed Success: The resulting table now correctly displays all new columns (including "Assign Reagent Vendor") populated with the data from File 2.
Expected Behavior:
The new column should be created and populated successfully in the initial merge (Step 2.A) without the need for the manual empty column workaround.
Suggestion:
The issue may be related to an internal flag or schema check that only triggers the column creation logic if the row count changes or if the column structure is explicitly altered before the merge process starts.
|
|
|
|
| Re: : Merge File Fails to Create New Column [message #2449 is a reply to message #2448] |
Mon, 24 November 2025 17:34  |
thomas
Messages: 740 Registered: June 2014
|
Senior Member |
|
|
Many thanks for providing an exact description of the problem. Nevertheless, there must be something that
I am missing, because despite trying with various made-up files, I could not reproduce the problem,
e.g. with the files attached here.
Using merge including or excluding the property column and with or without 'append' option always added column 'Something Else' as expected. Could you please send me two files that produce error, ideally per e-mail visible on https://openmolecules.org/about.html ?
-
Attachment: file1.dwar
(Size: 0.99KB, Downloaded 6 times)
-
Attachment: file2.dwar
(Size: 1.17KB, Downloaded 6 times)
[Updated on: Mon, 24 November 2025 17:39] Report message to a moderator
|
|
|
|