datacleaner / DataCleaner

The premier open source Data Quality solution
GNU Lesser General Public License v3.0
595 stars 180 forks source link

Analysis tasks on tables in Sybase database thinks schema is a column prefix in sql query causing error #1951

Open mdaflucas opened 1 year ago

mdaflucas commented 1 year ago

If I perform Quick Analysis of a table in SQL Server, I get the expected results. If I perform Quick Analysis of a table in Sybase, I get the error reported below.

1) How can I see the SQL statements getting executed (I tried loglevel=debug and trace in log4j.xml file to no avail) 2) Is this a defect or configuration error?

I attached both test jobs in zip file.

Thank you,

--- DataCleaner progress information user-log --- 09:49:07 INFO: Job begin 09:49:08 INFO: Starting processing of ADDRESS (approx. 8501951 rows) 09:49:08 INFO: Starting component 'Date/time analyzer (5 columns)' 09:49:08ERROR: An error occurred in the analysis job!

java.sql.SQLException: The column prefix '"ADDRESS"' does not match with a table name or alias name used in the query. Either the table is not specified in the FROM clause or it has a correlation name which must be used instead.

org.apache.metamodel.jdbc.UncheckedSQLException: java.sql.SQLException: The column prefix '"ADDRESS"' does not match with a table name or alias name used in the query. Either the table is not specified in the FROM clause or it has a correlation name which must be used instead.

at org.apache.metamodel.jdbc.JdbcUtils.wrapException(JdbcUtils.java:70)
at org.apache.metamodel.jdbc.JdbcDataContext.executeQuery(JdbcDataContext.java:541)
at org.apache.metamodel.jdbc.JdbcDataContext.executeQuery(JdbcDataContext.java:523)
at org.datacleaner.job.runner.SourceTableRowProcessingPublisher.processRowsInternal(SourceTableRowProcessingPublisher.java:220)
at org.datacleaner.job.runner.AbstractRowProcessingPublisher.processRows(AbstractRowProcessingPublisher.java:208)
at org.datacleaner.job.tasks.RunRowProcessingPublisherTask.execute(RunRowProcessingPublisherTask.java:43)
at org.datacleaner.job.concurrent.TaskRunnable.run(TaskRunnable.java:61)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

Test1.analysis.zip TestJobs.analysis.zip

mdaflucas commented 1 year ago

Anyone?

kaspersorensen commented 1 year ago

The details of the log config file escapes me, but I do know that if you can enable debug logging for the context org.apache.metamodel.jdbc then you'll be able to see the raw SQL statements in your log