Problem Description:


Incremental ingestion job failing with column modified error during the pre-job step for the Teradata tables when the JDBC driver for Teradata upgraded to the newer version. The sample stack trace looks something like below,


[ERROR] 2021-02-09 08:27:48,046 [pool-1-thread-1] io.infoworks.saas.ingestion.core.connectors.jdbc.crawler.AbstractJDBCCrawler:178 :: Error while running pre job steps.

java.lang.RuntimeException: Column CUST_ID is modified. Please reingest table DLS_FLNA_CUST_PRPSORD_XDK_MTRL_CMPNT

    at io.infoworks.saas.ingestion.core.metacrawl.MetaCrawlUtils.unionSchema(MetaCrawlUtils.java:498)

    at io.infoworks.saas.ingestion.core.crawl.crawlers.AbstractCrawler.synchSchema(AbstractCrawler.java:477)

    at io.infoworks.saas.ingestion.core.connectors.jdbc.crawler.AbstractJDBCCrawler.preJob(AbstractJDBCCrawler.java:176)

    at io.infoworks.connectors.rdbms.teradata.crawl.Crawler.preJob(Crawler.java:365)

    at io.infoworks.saas.ingestion.core.crawl.crawlers.AbstractSourceCrawler.parallelCall(AbstractSourceCrawler.java:103)

    at io.infoworks.saas.ingestion.core.connectors.jdbc.sourcecrawler.AbstractJDBCSourceCrawler.lambda$crawl$0(AbstractJDBCSourceCrawler.java:86)

    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624

    at java.lang.Thread.run(Thread.java:748)


Root cause:


We ship Teradata 15 driver as part of our product and during metadata crawl, this driver brings a precision value of 0. But if someone replaces the driver with a newer version let's say Teradata 16, that brings precision value same as the column size. This works fine for the newly created sources. But for the old one, the incremental ingestion job will fail during the pre-job stage as the new driver brings precision value same as column size.


Solution:


To resolve this we need to truncate the problematic tables and recrawl the metadata for those.


Applicable IWX versions:


IWX 4.x onwards