GoogleCloudPlatform / zetasql-toolkit

The ZetaSQL Toolkit is a library that helps users use ZetaSQL Java API to perform SQL analysis for multiple query engines, including BigQuery and Cloud Spanner.
Apache License 2.0
39 stars 10 forks source link

BigQuery resource not found: <project-name>.SAFE.INT64 #82

Closed dion-gdn closed 4 months ago

dion-gdn commented 4 months ago

Hi,

I got this error: com.google.zetasql.toolkit.catalog.bigquery.exceptions.BigQueryResourceNotFound: BigQuery resource not found: <project-name>.SAFE.INT64

Here's the sample of my query:

SELECT
  ... // (omitted)
  SAFE.STRING(data.foo) AS foo,
  SAFE.INT64(data.bar) AS bar,
  ...

Where data type is JSON.

Any idea what's wrong? Thanks

ppaglilla commented 4 months ago

Fixed by b449bde4e33d54d7c00fc9eb1713a965c8c9edcd. Will be included in release 0.5.3 in the next few days.

dion-gdn commented 3 months ago

hi @ppaglilla, are you sure this is fixed? I tested against the same query using branch version/v0.5.3 but still got the same error.

I think the error is thrown during getRoutinesOfType from BigQuery API: https://github.com/GoogleCloudPlatform/zetasql-toolkit/blob/ca4445014dcfff8e0180dd8132beb4b54068a7cf/zetasql-toolkit-bigquery/src/main/java/com/google/zetasql/toolkit/catalog/bigquery/BigQueryAPIResourceProvider.java#L525-L531

During debugging before getting error: image