14 Replies Latest reply on Jan 30, 2019 2:27 AM by Tim Lindner

    Spatial data from SQL Server not shown/recognized by Tableau Desktop

    Fred Verbeek

      Good afternoon,

       

      I tried several solutions found on the web and on the community pages, but I still don't manage to get the following work.

       

      I created a View in SQL Server 2008 R2. This view contains the following columns, and I've include one example record.

       

      KeyTravel DistancePolygonlatlon
      23298910POLYGON ((5.64306525023108 52.044234253021841, 5.6430582835821479 52.044179001503984, 5.6431052903604852 52.044131687622134, 5.6431886499322834 52.04411039997553, 5.6432763929143581 52.044123461034772, 5.6433347495623751 52.044165746824476, 5.64334171655102 52.044220998326026, 5.6432947099290383 52.044268312301945, 5.6432113501128134 52.044289600020122, 5.6431236068235791 52.044276538912584, 5.64306525023108 52.044234253021841))52,04420644583155,6431984186822

       

      The problem is that Tableau does not 'see' the column named 'Polygon'. Hence, I cannot use this data in my map. The column has the data type Geography (however, I also tried the data type Geometry).

       

      Still, Tableau does not recognize the column.

       

      Then, I tried to convert the data type to a string. Tableau then does 'see' the column, but does not treat the column as spatial data and by no means I can set the value to be recognized as spatial data.

       

      Strange enough: SQL Server has no problem interpreting his own spatial data (see attachment).

       

      I also tried the RAWSQL_SPATIAL function, by creating a calculated field from this field 'Polygon'. I'm getting an error in that scenario, which is not specified by Tableau.

       

      Does anyone know how to get this work? Of can anyone point me in the right direction?

       

      Thanks in advance,

       

      Fred