10 Replies Latest reply on Aug 29, 2013 2:08 AM by Matt Morgenroth

    invalid cursor

    Ertan ERISIK

      Hi there,

       

      I am currently using Tableau 8 in a Teradata environment and from time to time I am facing with "invalid cursor state" error with no apparent reason, other than there is a join in the connection. There seems to be very little clue to track the error, sometimes just clicking ok works, but sometimes there is no way to continue.

       

      The Teradata version is 13.00.01.34.

      The odbc driver version for Teradata is 14.00.00.04 .

       

      I just wanted to check if there are known issues with Teradata odbc driver with the versions above?

       

      Any guidance will highly be appreciated.

        • 1. Re: invalid cursor
          chris.schultz

          I am getting the same invalid cursor error message when trying to query a live connection to the same version of Teradata from Tableau 8.  Doesn't appear to be an ODBC issue because it works in other instances and appears to only happen when using the join multiple tables feature in the Tableau connection for Teradata

          • 2. Re: invalid cursor
            Cuneyd Kaya

            I am seeing the same error. I broke up the 3 table connection into two 2-table connections and it works this way. My data allowed me to do this, however, in my next project I know this fix will be crucial.

            • 3. Re: invalid cursor
              chris.schultz

              Thanks.  I was able to get my query to work once I removed a few of the tables but like you I will run into a problem if this reoccurs when I start joining more tables, which I will start having to do eventually since primary my source will be star schemas.

              • 4. Re: invalid cursor
                Ertan ERISIK

                Hi Chris and Cüneyd,

                 

                just out of curiosity, how many records you are dealing with?

                 

                In my situation, this happened when I try to filter the data for date of transaction in a table having a lot of rows and Tableau is sending a query to get max and min values of date with a count(1)>0 at the end of query and I realized that this indeed causes the problem. When I submit the query extracted from the database and run it thru query man of Teradata, I get numeric overflow error, then when I cast count(1) as bigint the error disappears. So it seems in my case it happens when the number of records to be counted is bigger than int. Just wondered the case of yours, is that the only case or are there other cases causing the same error.

                 

                I have already submitted a support request for this, waiting for a feedback or resolution from them.

                 

                Regards,

                • 5. Re: invalid cursor
                  Cuneyd Kaya

                  Chris and Ertan,

                   

                  Thank you for your responses, and Ertan especially, for digging through this error. My dataset is about 80 million rows. I am trying to join this table with two other reference tables which have about 50K rows each. I should be within the limits of Int.


                  It's always good practice to leave such work to the database side and use Tableau (or any other tool for that matter) for its  sole purpose. In this case, I was lazy and wanted to use less storage on the database side.


                  Best,


                  Cuneyd

                  • 6. Re: invalid cursor
                    Matt Morgenroth

                    Hey All,

                     

                    Thank you for bringing this to our attention. A customer reported this to our Support group and we're following up in development.

                    What we've found is that when computing the domain in Teradata for a filter the query used returns an INT value.  If your domain exceeds values that can be held by this data type, this error occurs.  Basic numeric overflow.  We're looking to make this more responsive to the larger data sets.The fix will be included in a future release (no further data available on release).

                     

                    Thank you for discussing this in our forums, it was helpful to our investigation.

                    Should you think Support can help on future such matters, login to your customer portal to log a case or if you don't have an account submit here: http://www.tableausoftware.com/support/request

                    • 7. Re: invalid cursor
                      Bryan Sheasby

                      I would appreciate it if that request could be bumped up in priority since this basically causes a complete work stoppage for me.

                       

                      Additionally, I have two very different instances where this happens. In one instance it could possibly be a "basic number overflow". In the other, that is probably not the case.

                       

                      Instance one:

                      Create a calculated field in Tableau desktop 8.0.2

                      I have a quite intensive logic in here as:

                      If ISNULL([Received_30Days]) = True

                      Then DATE( 2/9/2013 )

                      Else [Interval_Read_Date]

                      End

                       

                      (oddly Instance one works if there is only a single join)

                       

                      Instance two:

                      Create a calculated field in Tableau desktop 8.0.2

                      In this field the logic is simple as can be:

                      Now()

                       

                      Both return the same error. Both work if the number of joins is reduced. There is another bug going on here.

                      • 8. Re: invalid cursor
                        Bryan Sheasby

                        Update:

                        I was able to get the spool space allocated to my group of logins increased 10-fold. The Now() function is working after this was done. However, I still do not understand why it takes so much spool space just to ask for sysdate. I'm trying to get the SQL that Tableau generates when this calculation happens and see what it is doing.

                        • 9. Re: invalid cursor
                          Matt Morgenroth

                          Thanks for your patience everyone.  8.0.4 was released the other day and includes a fix for this issue.  It is referenced in the release notes by the following:

                          Connecting to a Teradata database with larger data sets or multiple table joins could result in an "Invalid Cursor State" error.

                          Release Notes | Tableau Software

                          1 of 1 people found this helpful
                          • 10. Re: invalid cursor
                            Matt Morgenroth

                            Hello Bryan.

                            Look in My Documents > My Tableau Repository > Logs for the query.  Queries are nested between <QUERY></QUERY> tags in the logs.

                            You may find some interesting information from Teradata as well by inspecting the query plan or statistics for this query that the Teradata database can provide.   If you find something curious, please start a new thread to discuss.

                            1 of 1 people found this helpful