6 Replies Latest reply on Apr 12, 2017 5:37 AM by Nikolas Moutafis

    XML Error when switching from Custom SQL Query to Initial SQL-Custom SQL Query

    Nikolas Moutafis



      I have a v9.2 dashboard that is a finished product with a data source created from a Custom SQL Query off of Sybase ASE server db. Recently, I had to make an adjustment to the SQL query to expand the list of accounts that the data source would include. This made the query very costly and produced connection timeout errors.


      Because of these errors I decided to utilize the Initial SQL. I threw the new costly Custom SQL Query into the Initial SQL window and added an INTO clause to create a temp table, #TEMP1. Then I adjusted the Custom SQL Query to just do a SELECT * FROM #TEMP1 and everything worked fine on my desktop.


      When I went to publish the workbook, I got an "Unexpected Error" with the following details:


      • Initial SQL Error. Check that the syntax is correct and that you have access privileges to the requested database.
      • Error parsing XML at line 200 of the file: not well-formed (invalid token)
      • Unexpected Error


      My first thought was that maybe my server was not configured for Initial SQL, so I created a TEST tableau workbook and implemented the same Initial SQL and Custom SQL but this time before creating the dashboard, then created a basic sheet with a total for revenue. I was successfully able to publish it to the server. Because of this, I'm thinking that creating Initial SQL after the dashboard was completed, and switching the background of the data source to that temp table, caused this issue.


      Has anyone had this experience and know of a way to rectify the issue without recreating the whole workbook?