I have an instance of Geoserver 2.8.2 running and a PostGIS database. I am attempting to create a FeatureType based on an SQL view of the following table (viewed through psql \d):

                 Table "public.rapid_feature"
       Column       |          Type           | Modifiers
 uid                | text                    | not null
 geom               | geometry(Geometry,4326) |
 bbox               | geometry(Polygon,4326)  |
 properties         | jsonb                   | not null
 create_timestamp   | time without time zone  |
 hash               | text                    |
 modified_timestamp | time without time zone  |
 layer_id           | text                    |

However, when I create an FeatureType based on an SQL View of this table, the properties attribute disappears:

enter image description here

Not sure what I need to do to make the properties column appear as an attribute in Geoserver.

  • 3
    You need to do a feature request. GeoServer does not support jsonb datatype. There are other not supported data types like HSTORE. As a workaround you could convert your field into TEXT. – user30184 Jul 27 '16 at 18:05
  • @user30184 Thanks for the info. Originally, I had the field as a JSON string, but I wasn't able to query with a CQL filter based on that string the way I wanted. – Ben Jul 27 '16 at 18:21

As @user30184 says to get a JSONB column to appear in GeoServer would involve adding the ability to read and understand them to the GeoTools postgis datastore. The code for which is on github.

As a quicker fix you could break that column out into it's component parts and store them as normal columns that GeoServer can recognise and that you could use CQL filters against.

Your Answer

