What is the level of precision of Property Data Types in openBIS? Is this set per default or can it be customized at the linstance level or another level of the openBIS data structure?
In specific for data types like REAL, INTEGER, TIME STAMP:
What is the number of decimal places stored?
What is the formating of the value in the UI and exports?
Is there rounding behaviour during data entry or processing?
This is a very good question and we should do a better job at documenting this:
- INTEGER is intended to be equivalent to a Java Long, both on the Back-end and stored on the database with the same precision, so expect that behavior all way through the system:
- REAL is intended to be equivalent to a Java Double, both on the Back-end and stored on the database with the same precision, so expect that behavior all way through the system:
- TIMESTAMP is intended to be equivalent to an ISO timestamp following the pattern “yyyy-MM-dd HH:mm:ss Z”, and managed using a Java ZonedDateTime, also stored at the database with the same precision, so expect that behavior all way through the system:
- APIs don’t modify values, they just pass-through the value.
- User Interfaces might validate or not that is a number without modifying it, but is ultimately the back-end validation who decides that the given value fits it’s data type or throw an error without modifying it.
I would initially consider any deviation from the statements above as a bug.