Project: talenddataquality
Issue TDQ-11853: We should handle SQL engine error when apply Fraud Detection to a pure text column
I have used the datas from Redshift connection. In my datas, I have numeric columns and pure text columns, their type is recognized as "varchar", as screenshot 1. I applied Fraud Detection, and chose "SQL" execution engine. Then I have the error below: 2016-04-08 16:24:03,300 ERROR org.talend.dq.analysis.AnalysisExecutor - Query not executed for indicator: Benford Law FrequencySQL query: SELECT SUBSTRING(cast("jobtitle" as char),1,2), COUNT(*) FROM "public"."testtable" t GROUP BY SUBSTRING(cast("jobtitle" as char),1,2) order by SUBSTRING(cast("jobtitle" as char),1,2) LIMIT 50 com.paraccel.util.PSQLException: ERROR: Invalid characters: Detail: ----------------------------------------------- error: Invalid characters: code: 8001 context: Only ASCII characters are allowed in fixed length strings. Invalid ASCII char: c3 query: 20346 location: funcs_string.cpp:1946 process: query0_50 [pid=1981] ----------------------------------------------- com.paraccel.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1780) com.paraccel.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1515) com.paraccel.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194) com.paraccel.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) com.paraccel.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:336) com.paraccel.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:328) org.talend.dq.analysis.ColumnAnalysisSqlExecutor.executeQuery(ColumnAnalysisSqlExecutor.java:1420) org.talend.dq.analysis.ColumnAnalysisSqlExecutor.executeQuery(ColumnAnalysisSqlExecutor.java:1373) org.talend.dq.analysis.ColumnAnalysisSqlParallelExecutor.run(ColumnAnalysisSqlParallelExecutor.java:103) org.talend.dq.analysis.ColumnAnalysisSqlExecutor$ExecutiveAnalysisJob.run(ColumnAnalysisSqlExecutor.java:1190) org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 2016-04-08 16:24:03,299 ERROR org.talend.dq.analysis.ColumnAnalysisSqlParallelExecutor - com.paraccel.util.PSQLException: ERROR: Invalid characters: Detail: ----------------------------------------------- error: Invalid characters: code: 8001 context: Only ASCII characters are allowed in fixed length strings. Invalid ASCII char: c3 query: 20346 location: funcs_string.cpp:1946 process: query0_50 [pid=1981] ----------------------------------------------- But if I choose "Java" execution engine, there is no prb, I have the results as screenshot2.
Story points: 3