1 Reply Latest reply on Aug 2, 2014 9:29 AM by Russell Christopher

    SQL Datatype Geography

    DingoCC DingoCC

      Hi,

       

      I loaded a table from Microsoft SQL Server with a column of datatype Geography.  It does not display the column (not hidden either).  Is it simply not supported?

       

      Cheers.

        • 1. Re: SQL Datatype Geography
          Russell Christopher

          Well, the SQL Server data type is one of those "odd" CLR data types that SQL Server implements via .NET. I suspect that since it's non-standard in terms of ANSI SQL, Tableau doesn't implement it.

           

          You just need to parse out the lat and lon yourself. For example, given this SQL Table:

           

          Screen Shot 2014-08-02 at 12.21.40 PM.png

           

          We won't see the geography DT:

           

          Screen Shot 2014-08-02 at 12.22.01 PM.png

           

          Parse the stuff yourself with Custom SQL, and you're happy:

           

          Screen Shot 2014-08-02 at 12.26.40 PM.png

          Screen Shot 2014-08-02 at 12.27.22 PM.png

           

          ...might be smarter to do this work in SQL Server itself with a View, but I'm being lazy. Sometimes Custom SQL isn't great for performance.