Whenever I export data from easymorph to postgres empty strings are converted to NULL values, is there a way to prevent this as otherwise I need to post process the data with REPLACE or COALESCE etc when doing queries. Would make my life easier
Which action are you using: Export to databse or Bulk export to databse?
EasyMorph distinguishes between empty values and empty text values. You can see the distinction in the Cell Profiler (also empty values have a darker cell background).
An empty value is a special value equivalent to NULL in databases.
An empty text value is a text value which length is 0, i.e. ""
.
Correspondingly, empty values are exported to databases as NULLs. Empty text values are exported as database text values.
Therefore, to resolve your issue, convert empty values to empty text values in EasyMorph before exporting to Postgres. You can do it, for instance, using the "Modify column" action and the expression below:
if isempty([Column]) then "" else [Column]
Thanks. Depending on the number of columns it can be time consuming. Maybe in a future enhancement you might consider an export option that allows setting a default value for NULL/Empty strings