KNOWLEDGE BASE

Tableau Prep Error with MySQL "[SQLSTATE:42P21] collation mismatch between implicit collations 'binary' and 'root'"


Published: 21 Feb 2023
Last Modified Date: 07 Mar 2023

Issue

When using MySQL as an input in Tableau Prep, then adding a clean step to change a "number" to "string", and apply the group value (replace value) on this "string", the error appears as follows:
 
[SQLSTATE:42P21] collation mismatch between implicit collations "binary" and "root" 

Environment

  • Tableau Prep Builder 2022.4.1 and newer
  • Windows 10
  • MySQL

Resolution

Use a calculation to replace the group value step as demonstrated in our example:

IF [field]='0' THEN 'test'
ELSE [field]
END

Cause

This issue is being investigated under Known Issue 1501823.
Did this article resolve the issue?