Heterogenous transaction indexing can trigger the database clause limit and surface a Java exception


Transaction indexing fails when both of its join conditions use the same field in the transaction table. This issue is triggered when fully heterogenous transactions are being incrementally indexed with a Primary key that is also a Join key. This issue doesn't impact relationships, only transactions. 

If you encounter this issue when using SQL Server, an error message similar to the following appears in the indexer log:

ERROR 556 --- [  dataIndexer26] org.apache.metamodel.jdbc.JdbcUtils      : service@@acme Could not execute compiled query: [SAS][SQLServer JDBC Driver][SQLServer]The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request., Error code=8003, SQL state=HY000

java.sql.SQLException: [SAS][SQLServer JDBC Driver][SQLServer]The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

        at com.sas.svi.jdbc.sqlserverbase.ddco.a(Unknown Source)

        at com.sas.fcs.datahub.services.data.loader.jobs.scalable.item.
       IncrementalTransactionItemReader.doReadPage(
       IncrementalTransactionItemReader.java:85)