Project: talenddataquality
Issue TDQ-4724: Data Profiler cannot handle nvarchar types
A prospect is trying to perform Data Profiler analysis on a SQLServer table that has nvarchar columns and is getting nulls returned for the pattern analysis. Following is the email from the prospect. -After reinstalling the tool I was able to select the checkbox in the Pattern Analysis, text analysis and others that wasn´t enabled, so the result of the pattern analysis still only null values; I looked for another possible reason and I found that my data was varchar type, and the query built by the tool or the driver has some problems to handle this data type, here is the example. This is the query generated SELECT * FROM "SERVICIO_GUIAS"."dbo"."BD_Captura_Calidad_31052011" WHERE ("CALLE" IS NOT NULL ) AND ( LTRIM(RTRIM( CASE WHEN "CALLE" IS NULL THEN 'NULL TALEND' ELSE "CALLE" END )) <> '' ) AND DATALENGTH("CALLE") = (SELECT MIN(LEN("CALLE")) FROM "SERVICIO_GUIAS"."dbo"."BD_Captura_Calidad_31052011" WHERE ("CALLE" IS NOT NULL ) AND ( LTRIM(RTRIM( CASE WHEN "CALLE" IS NULL THEN 'NULL TALEND' ELSE "CALLE" END )) <> '' )) If My String is "ANGEL" USING VARCHAR DATALENGTH("CALLE") returns "5" LEN("CALLE") returns "5" USING NVARCHAR DATALENGTH("CALLE") returns "10" LEN("CALLE") returns "5" This makes that query has no results The action taken was change NVARCHAR data type for VARCHAR
Story points: 8