In order to remove the default spaces for CHAR or TEXT data type fields, I would check the option “Ignore trailing spaces” under the “Read & Write” tab of the ODBC or JDBC data source.
If this option is selected, Virtual DataPort will remove the unneeded space characters at the end of the CHAR/TEXT type values of the results obtained by the data source’s views. Using this option you don’t need to apply the trim function.
You can refer to subsection [“Read & Write” tab](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/importing_data_sources_and_creating_base_views/jdbc_sources#importing-jdbc-sources) under the section ‘**Importing JDBC Sources**' of the Virtual DataPort Administration Guide to know more information.
Hope this helps!!