I posted a similar question regarding the dynamic input tool but after testing different approaches, I'm facing the same issue with the input tool.
Please let me know if anyone faced the same issue with Postgres queries. Initially, when I import a table, geom column type is geometry but if I close the input tool and reopen it, geom column switches to string. Is this a bug or input tool need some configuration?
I posted two times referring to the same issue but no response at all. I didn't find any solved posts and decided to find a workaround. Finally, I used the PostGIS function
ST_AsGeoJSON()
to convert geometry to Geojson with a query in dynamic input and convert back from Geojson to spatial object with a select tool. There are minor issues with some large geometries conversion caused by the size of Geojson characters but I suppose it can be solved.
Maybe someone will find this workaround useful.
@rewaza Have you tried a different ODBC driver? From our documentation, it looks like the there is more than one available (although only one is "officially" supported).
https://help.alteryx.com/20221/designer/postgresql
When working with Alteryx and SQL Server, I have seen differences in Spatial column behavior depending on the ODBC driver I'm using. For example with SQL Server, the Native Client is more forgiving.
Yes, I tried ANSI, Unicode, and Unicode(x64). I read the documentation before posting. It says "You can use either the ANSI 32-bit driver or the Unicode® ODBC driver. If using the ODBC connection for spatial data, use the Unicode® ODBC driver"
I remember, I had this issue only with dynamic input and the ordinary input tool worked well but now I have with both tools.
The character limitation issue is solved by increasing the limit of Max LongVarChar in the ODBC admin panel.
I set it to 999999