Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

PostgreSQL Geometry field imported as string

rewaza
7 - Meteor

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?

 

rewaza_0-1661198523131.png

 

4 REPLIES 4
rewaza
7 - Meteor

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_0-1661257909474.png

 

PhilipL
Alteryx
Alteryx

@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.

rewaza
7 - Meteor

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.

rewaza_0-1661605243800.png

 

rewaza
7 - Meteor

The character limitation issue is solved by increasing the limit of Max LongVarChar in the ODBC admin panel.
I set it to 999999

rewaza_0-1661615403555.png

 

Labels