Dear Henning,
those modules do not support array column types, this would be a nice
feature to have.

A pull request contributing it would be very welcomed, you may also want to
check the GeoServer Support <https://geoserver.org/support/> in case you
want to fund it.

Kind regards,
Nuno Oliveira

On Fri, Sep 9, 2022 at 10:13 AM Henning Lorenz <henning.lor...@geo.uu.se>
wrote:

> geoserver 2.21, app schema/smart data loader/ogc api/feature templating
> plugins (Tomcat 9 on Ubuntu 22.04; openjdk 11.0.16)
>
> Hello,
>
> I appreciate any help on the following two (related?) problems (further
> explained below):
>
>    1. The "Smart Data Loader" plugin fails in case Array Type is present
>    in one of the tables (error unknown data type)
>    2. The "Feature Templating" plugin does not handle data from columns
>    with Array Type correctly ("[Ljava.lang.String;@..."
>    <[Ljava.lang.String;@...>)
>
> Of particular importance to me is to solve problem 2, as this directly
> affects geoserver output.
>
> Many thanks in advance,
>
> Henning
>
> -----
>
> Problem 1:
>
>    - I create two tables, one without and one without a column of Array
>    Type (called here "noarray_table" and "array_table"; only for explanation
>    instead of my more complex setup):
>
> CREATE TABLE test.noarray_table (
>     id SERIAL PRIMARY KEY,
>     geometry geometry(point, 4326),
>     attribute1 varchar,
>     attribute2 varchar
> );
>
> CREATE TABLE test.array_table (
>     id SERIAL PRIMARY KEY,
>     geometry geometry(point, 4326),
>     attribute1 varchar,
>     attribute2 varchar[]
> );
>
>
>    - After adding some data, I create a PostGIS data store for database
>    that contains the tables.
>    - When this is done, I add a new data store and select "Smart Data
>    Loader".
>       - When I select the noarray_table as root entity, I get the
>       expected preview and can add the data store.
>       - However, when I select the array_table, I get an error message
>       over the entire page. As far as I can tell, the critical line is "Caused
>       by: java.lang.RuntimeException: Attribute type '_varchar' is unknown.".
>       _varchar is the same as varchar[] as far as I can tell.
>
> Is this a bug or does Smart Data Loader not support Array Types ("missing
> feature")?
>
>
> Problem 2:
>
> The Feature Templating plugin explicitly supports Array Types
> (see
> https://docs.geoserver.org/stable/en/user/community/features-templating/directives.html#array-based-properties-json-based-templates-only
> )
>
>    - With the Smart Data Loader, I create an app schema mapping and
>    schema of tables without Array Type
>    - I configure feature templating and I get valid output.
>    - However, one of the columns should actually be of array type. Thus,
>    I replace this varchar-column by a varchar[]-column, including type casting
>    of the content.
>       - According to the documentation, I expect that the Array Type of
>       the column is recognised by the plugin and the data are expanded
>       accordingly.
>       - However, I see "[Ljava.lang.String;@..." <[Ljava.lang.String;@...>
>       instead of data. According to what I could find out, this indicates the
>       presence of array data where no array data are expected.
>
> This leaves two options:
>
> A) It is not sufficient to just change the Data Type in the database,
> something in the configuration has to be changed as well (App Schema
> mapping file, schema - although Array Type is not supported for XML
> according to the documentation, which would suggest that this is not the
> case).
>
> B) The Feature Templating plugin doesn't work as expected, i.e. it's a bug.
>
>
>
>
>
>
>
>
>
>
> När du har kontakt med oss på Uppsala universitet med e-post så innebär
> det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör
> det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/
>
> E-mailing Uppsala University means that we will process your personal
> data. For more information on how this is performed, please read here:
> http://www.uu.se/en/about-uu/data-protection-policy
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards,

Nuno Oliveira

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313
fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to