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

SNOW-1834293: Error reading data using SnowflakeType GEOMETRY #1977

Open
tdaggers10 opened this issue Nov 29, 2024 · 2 comments
Open

SNOW-1834293: Error reading data using SnowflakeType GEOMETRY #1977

tdaggers10 opened this issue Nov 29, 2024 · 2 comments
Assignees
Labels
status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage

Comments

@tdaggers10
Copy link

tdaggers10 commented Nov 29, 2024

  1. What version of JDBC driver are you using? 3.13.3

  2. What operating system and processor architecture are you using? Windows Server 2019 standard: version 1809, x64-processor

  3. What version of Java are you using? Java2d 11.0.22

  4. What did you do?

When using the snowflake jdbc plugin in an application, we were able to visualize spatial data of SnowflakeType GEOGRAPHY. However, when importing data of SnowflakeType GEOMETRY we run into the following error:

code=’internalError’Rendering process failed. Layers: SUBSIDIEGRENS_TEST9net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: error line 2 at position 20
Invalid argument types for function ‘ST_INTERSECTS’: (GEOGRAPHY, GEOMETRY)

In our work it is necessary for us to have the data in EPSG:28992. However, reprojecting the data in FME automatically results in a SnowflakeType GEOMETRY.

  1. What did you expect to see?

  2. Can you set logging to DEBUG and collect the logs?

Caused by: java.io.IOException
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:650)
at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:636)
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:174)
... 134 more
Caused by: java.sql.SQLException: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: error line 2 at position 20
Invalid argument types for function 'ST_INTERSECTS': (GEOGRAPHY, GEOMETRY)
at org.geotools.jdbc.JDBCFeatureReader.runQuery(JDBCFeatureReader.java:282)
at org.geotools.jdbc.JDBCFeatureReader.(JDBCFeatureReader.java:153)
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:620)
... 136 more
Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: error line 2 at position 20
Invalid argument types for function 'ST_INTERSECTS': (GEOGRAPHY, GEOMETRY)
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowExceptionSub(SnowflakeUtil.java:126)
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:66)
at net.snowflake.client.core.StmtUtil.pollForOutput(StmtUtil.java:434)
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:338)
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:482)
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:194)
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:131)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:737)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:635)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:238)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:133)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.jdbc.JDBCFeatureReader.lambda$new$0(JDBCFeatureReader.java:153)
at org.geotools.jdbc.JDBCFeatureReader.runQuery(JDBCFeatureReader.java:271)
... 138 more

Before sharing any information, please be sure to review the log and remove any sensitive
information.

@tdaggers10 tdaggers10 added the bug label Nov 29, 2024
@github-actions github-actions bot changed the title Error reading data using SnowflakeType GEOMETRY SNOW-1834293: Error reading data using SnowflakeType GEOMETRY Nov 29, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Dec 17, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi - thank you for filing this issue with us. JDBC driver 3.13.3 is unsupported as of now. Furthermore I think GEOMETRY support only was added with 3.13.28.

So for debugging this further, could you please

  • install a supported version of the Snowflake JDBC driver (recommended is the latest)
  • if the issue reproduces even with a supported driver version, can you please provide a minimal reproduction setup which when executed, exhibits the behaviour you're observing?

Let me know please.

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage status-information_needed Additional information is required from the reporter and removed bug labels Dec 17, 2024
@tdaggers10
Copy link
Author

tdaggers10 commented Dec 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage
Projects
None yet
Development

No branches or pull requests

2 participants