1 Reply Latest reply on Sep 3, 2019 2:17 PM by Chris McClellan

    Tableau is not able to cancel ODBC query

    Enrico Giarola

      Hi All,


      we have a problem if hitting the "Cancel"-Button in Tableau when using HiT ODBC/400 Driver (developed in my company).

      We saw that there is a known problem. https://community.tableau.com/message/333641


      But this happens every time using our.

      Today we made some tests and created some Logs. We tried four different ways to connect.

      1. SQL-Server

      2. SQL-Server with ODBC

      3. IBM DB2 for i with ODBC from IBM

      4. IBM DB2 for i with ODBC from HiT

      Everytime I used the same table and did the same. I pulled two fields to the columns and then the added "Number of records".

      After 5 seconds of the query, I hit "Cancel". With options 1 to 3 I came back to Tableau and could work with it. With the HiT ODBC/400, I couldn't do anything. Tableau freezed.

      The query normally takes approximately 15 seconds. I recognized that Tableau came back to life some seconds after I hit "Cancel". It looks like Tableau still was waiting for the data and as soon as the query ends, it came back and even showed the data.


      Maybe there is something Tableau wants the driver to return?

      What does Tableau send to an ODBC driver when he wants to block the query?



        • 1. Re: Tableau is not able to cancel ODBC query
          Chris McClellan

          I don't know the exact answer to this, but I've always explained it like this ...


          When you hit cancel in the dialog box, Tableau sends the cancel command to the database connection.  The database MUST be listening for a new command, if it's busy querying data or some other task and it's not listening Tableau "freezes" waiting for the database to acknowledge the cancel request.


          On some databases that I've worked with previously, we quickly learned to NEVER press cancel because it just never worked.  Is that a problem with the ODBC driver or the database itself ? I've never bothered to figure it out, there's not much you can do to fix it, you just have to live with it.