ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
1 Day Left! - The Alteryx Community will be temporarily unavailable for a few hours due to implementation of the new SSO experience starting tomorrow at 5pm MDT. Please plan accordingly. For more information, read the blog.

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Error: "Cursors are not supported" or "Cursor support is not an implemented feature" when running a workflow against SQL Server or Azure Synapse

gtorres8
Alteryx
Alteryx
Created

Environment Details


When running a workflow that contains queries connected to SQL Server or Azure Synapse (formerly known as Azure Data Warehouse), respectively; the following error occurs:
 

Azure Synapse


Error: Input Data (1): Error SQLExecute: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Cursor support is not an implemented feature for SQL Server Parallel DataWarehousing TDS endpoint.
 

 

SQL Server


Error: Input Data (1): Error SQLExecute: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cursors are not supported on a table which has a clustered columnstore index.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared.
 

Alt SQL Server Error

 

Invalid cursor state UPDATE <table_name> SET <followed by every field name in the data>


  • Alteryx Designer
    • All version
  • Input Data Tool
  • SQL Server ODBC Drivers
    • Native Client 11
    • ODBC 13
    • ODBC 17
  • SQL Server OLEDB
  • SQL Server
    • 2012R2 +
  • Azure Synapse (Azure Data Warehouse)


Cause


Cause 1


The SQL Server table involved the data set contains a ColumnStore Index. By default, ODBC automatically opens a cursor for every result set returned from a SQL statement.

 

Cause 2


Cursors are not supported on Azure Synapse. By default, the Synapse SQL pool creates a clustered columnstore index when no index options are specified on a table.



Resolution


Workaround 1


Connect to the SQL Server database using OleDB drivers instead of ODBC, if possible.

 

Workaround 2

 

1. In the Choose Table or Specify Query window, select the SQL Editor tab.

2. After the SQL query, enter the line: SET NOCOUNT ON at the end as such:
 

--SQL query code here--
SET NOCOUNT ON
 

3. Click OK and re-run the workflow.
 

Note


Opening the Visual Query Builder to edit the query will cause the parsing error seen below, which can be ignored.





It's also possible to set the SQL Editor as the default to avoid the error from showing up right away.



 

Additional Resources