Per the title, spatial joins don't work when using an external database. In this case, PostgreSQL.
One table has points encoded as geometry. ArcGIS correctly identifies them.
The other table has polygons included in a shapefile. Polygons render correctly on the map.
Attempt to join the two tables using "intersect" generates the error.
ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Invalid SQL syntax[ERROR: syntax error at or near "%"
LINE 1: select bike_share.public.%bike_stations_data_3_8_52_305_1406...
^::SQLSTATE=42601]
Failed to execute (AddSpatialJoin).
How does one workaround the wildcard symbol where it does not belong?
Is it the case that while one can connect to external databases, the feature is totally broken?
Solved! Go to Solution.
LOL no.
This is a local Postgresql instance. I'm using the postgres user credentials.
The error message makes it obvious the problem is the developers didn't take the time to parse available columns, then write the SELECT statement using the available columns.
The documentation suggests it would "just work." It does not. At all.
https://pro.arcgis.com/en/pro-app/3.3/help/data/databases/database-connections-in-arcgis-pro.htm
1 + 1 = 3
Null. Duplicate
In the error I see reference to PostgreSQL's 'public' user schema.
As of PG15, working with public schema to store user data has been strongly discouraged by the the PostgreSQL developers and community due to security concerns, and default access rights revoked. This may be causing you issues.
I recommend you to create a new user with its own dedicated user schema and not grant it superuser rights but just leave it at its ordinary limited rights.
LOL no.
This is a local Postgresql instance. I'm using the postgres user credentials.
The error message makes it obvious the problem is the developers didn't take the time to parse available columns, then write the SELECT statement using the available columns.
The documentation suggests it would "just work." It does not. At all.
https://pro.arcgis.com/en/pro-app/3.3/help/data/databases/database-connections-in-arcgis-pro.htm
1 + 1 = 3
Null. Duplicate
3 + 3 = 33
Null. Duplicate