Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_CONTAINS ERROR Unexpected parameters (varbinary, Geometry) #3

Open
ajcastany opened this issue Jul 25, 2023 · 1 comment
Open

ST_CONTAINS ERROR Unexpected parameters (varbinary, Geometry) #3

ajcastany opened this issue Jul 25, 2023 · 1 comment

Comments

@ajcastany
Copy link

When running the query on page 84, either on bash or on the athena query editor I have the following error:

SYNTAX_ERROR: line 4:7: Unexpected parameters (varbinary, Geometry) for function st_contains. Expected: st_contains(Geometry, Geometry) , st_contains(varchar, varchar) , st_contains(Geometry, varchar) , st_contains(varchar, Geometry)
This query ran against the "packt_serverless_analytics" database, unless qualified by the query

The datasets were downloaded with the script in this repository. I have tried to use ST_GeomFromBinary(varbinary) to convert it to Geometry, but it complains about the WKB representation? (this is with both Athena Engine 2 and 3)

@ajcastany
Copy link
Author

I managed to make it work, updating the engine to lvl 3 and converting the counties.boundaryshape with geometry_from_hadoop_shape so where st_contains(geometry_from_hadoop_shape(counties.boundaryshape)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant