JDBC Input Plugin | Pagination | Problem with SQL server if query contains CTE

In JDBC input plugin, pagination works by enclosing the given source query as a sub query and the applying the offset and limit to the query.

The count query also works in the same way.

The problem arises when the query contains a CTE. According to SQL server documentation CTE or with clause must be the first clause in the query.

The table from which we are indexing contains approximately 20 million records.

Is there a workaround for this problem is logstash or should we move to alternate methods to index data? What is the best possible solution for this problem.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.