Why does the ODBC driver return an extra "ROWSTAT" column when connected to a Azure Data Explorer (*.kusto.windows.net)?

Kevin Seekell 1 Reputation point
2021-02-26T21:48:59.313+00:00

We are using ODBC Driver 17 for SQL Server to connect to Azure Data Explorer (*.kusto.windows.net). We use SQLExecDirect to execute a query such along the lines of "SELECT col1 from table". We expect the result to only contain 1 column. However, a later call to SQLNumResultCols indicates that there are actually 2 columns in the result. The second column is called "ROWSTAT" and appears to have a value of 1 in every row. I couldn't find much about "ROWSTAT" online other that it is supposed to be a hidden column. Every query we run against the server includes this extra column. Could someone provide an explanation about why this could be appearing, and how to prevent it from appearing in our results? This behavior is problematic for applications that expect the amount of returned columns to match the number of columns requested.

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
482 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,759 questions
{count} votes