1 Reply Latest reply on Apr 5, 2017 6:25 PM by David Felstead

    StdDev in custom ODBC driver?

    David Felstead

      Hi Tableau community - we have been using an internal proprietary ODBC driver to connect Tableau (Desktop and Server, 10.0.0.latest) to an internal data source, and it has been working out pretty well.


      One thing that is missing though is the ability to do a stddev or variance aggregation.  As far as I can tell, there is no flag that can be queried by SQLGetInfo in the ODBC standard that tells a driver that these aggregations can be used.  Perhaps as a result for my driver I get these messages:


      This aggregation is unsupported: Attribute

      This aggregation is unsupported: Std. Dev

      This aggregation is unsupported: Std. Dev (Pop.)

      This aggregation is unsupported: Variance

      This aggregation is unsupported: Variance (Pop.)


      However, it seems that even without the SQLGetInfo probe, Tableau+ODBC can do these aggregations with (for example) the SQL Server ODBC driver (except Attribute).  My question is "how can I get Tableau to recognize that these aggregations are available in my custom ODBC driver?".  We have full control over the driver, so can update return values from any of ODBC calls, but I don't see anything that allows us to show that.  I'm wondering if Tableau is just looking for "SQL Server" in the driver name and using that to infer that particular capability, but I'm just guessing.


      (EDIT: I should mention that due to the volume of data, which is in the hundreds of GB to several TB mark, extracts are not super practical, though they do work around this particular problem)


      Thanks for any help!



        • 1. Re: StdDev in custom ODBC driver?
          David Felstead

          So inadvertently it looks like I discovered how this is done when playing with the SQL Server ODBC driver.  It seems that Tableau does not use a native StdDev or Variance aggregation when using ODBC, instead it calculates it via first principles via the use of SUM, COUNT, POWER and SQRT.  I didn't have POWER and SQRT scalar functions implemented so Tableau complained about the missing aggregations - I just implemented them and it now is able to generate the SQL to get at them.  Problem solved!


          Just thought I'd post this for any future explorers.

          1 of 1 people found this helpful