When writing data to PostgreSQL from a MySQL source, e.g. when materializing a table or view, you may encounter the following error:
TEIID30504 TEIID30020 Processing exception for request -8112269768431953610.-1358838137594235897 'TEIID30504 dwhSOU:
Next Exception: ERROR: invalid byte sequence for encoding "UTF8": 0x000 TEIID11013:BatchUpdateException-Batch entry 1,583 INSERT INTO dwh.mat_table_588_st0
Strings in MySQL may contain NULL characters (0x000) which are not supported by PostgreSQL. Therefore, those NULL characters need to be replaced before writing the string to PostgreSQL.
This can be achieved by editing the PostgreSQL data source and adding translator parameter replaceNullCharsWith="". This will replace the NULL characters with an empty string so that the string can now be saved to PostgreSQL.