You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a computed expression retrieves a value from another table and is used in a field, the issue arises during the roundtrip of data export and import:
Export Behavior:
The column for the computed field is left empty in the downloaded data. This is acceptable if the computed value is correctly recalculated during the upload process. See screenshot example download, field: datebirth, is empty, this field is computed value.
Import Behavior:
However, during the import, the computed value is not populated, leaving the column empty. If this field is used in other validation rules, it leads to an error due to the missing value. The datebirth field is used as validation in entryDate, so if empty it gives error:
create new database with petstore and example data
Go to schema editor
Add column dateBirth in Order AND in Pet
In Order and column dateBirth, add computed expression: "pet?.dateBirth"
Add column entryDate to Order
Add validation expression in column entryDate: if(!(entryDate>=dateBirth))'First Contact date cannot be less than birth date'
Save everything
Go to pet, add a pet with dateBirth
Add new order selecting the pet with dateBirth
Make sure you also add a entryDate.
Save the order
Download orders with download button.
Go to Up/Download and upload the file you just downloaded.
See error.
Expected behaviour
During Export:
The computed field should either:
a. Be populated with the computed value in the exported data.
b. Be explicitly marked as a computed field to indicate it will be calculated upon re-import.
During Import:
If the exported data does not include values for computed fields, these fields should be automatically recalculated and populated during the upload process.
Validation should consider the recomputed values, ensuring no errors arise due to missing values in computed fields.
Roundtrip Behavior:
Data exported and then re-imported without modification should result in no errors or data loss, maintaining consistency and meeting validation requirements.
This ensures that the roundtrip process (export → import) is seamless and error-free, preserving data integrity and usability.
System configuration
Device: computer
Operating system: iOS
Browser: Chrome
The text was updated successfully, but these errors were encountered:
Have you checked if this issue already exists?
Molgenis EMX2 version
Software version: v11.40.3. Database version: 23.
Description
When a computed expression retrieves a value from another table and is used in a field, the issue arises during the roundtrip of data export and import:
Export Behavior:
The column for the computed field is left empty in the downloaded data. This is acceptable if the computed value is correctly recalculated during the upload process. See screenshot example download, field: datebirth, is empty, this field is computed value.
Import Behavior:
However, during the import, the computed value is not populated, leaving the column empty. If this field is used in other validation rules, it leads to an error due to the missing value. The datebirth field is used as validation in entryDate, so if empty it gives error:
Reproduction steps
On the dev, I create schema: https://emx2.dev.molgenis.org/issueFernanda, there you can download Orders, and try to upload this downloaded xlsx. Then you get error.
If schemas are removed:
Expected behaviour
The computed field should either:
a. Be populated with the computed value in the exported data.
b. Be explicitly marked as a computed field to indicate it will be calculated upon re-import.
If the exported data does not include values for computed fields, these fields should be automatically recalculated and populated during the upload process.
Validation should consider the recomputed values, ensuring no errors arise due to missing values in computed fields.
Data exported and then re-imported without modification should result in no errors or data loss, maintaining consistency and meeting validation requirements.
This ensures that the roundtrip process (export → import) is seamless and error-free, preserving data integrity and usability.
System configuration
The text was updated successfully, but these errors were encountered: