graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Not able to connect to Google BigQuery

Open radhay-samagra opened this issue 3 years ago • 0 comments

Version Information: 2.9.0

Server Version: CLI Version (for CLI related issue):

Environment

OSS

What is the current behaviour?

Not able to connect to BigQuery from Hasura v2.9.0

What is the expected behaviour?

Fetch metadata for Graphql Queries

How to reproduce the issue?

  1. Installed Hasura docker-compose and followed steps from docs page
  2. Provided access to a service account as instructed in the docs and downloaded a service-account.json file.
  3. tried adding datasource from console, then got exception mentioned below:
hasura-bigQuery   | {"type":"http-log","timestamp":"2022-08-09T14:46:03.105+0000","level":"error","detail":{"operation":{"user_vars":{"x-hasura-role":"admin"},"error":{"internal":[{"definition":"samarth-bigQuery","reason":"Inconsistent object: unexpected exception while connecting to database: GetMetaDecodeProblem \"Error in $.schema: parsing Hasura.Backends.BigQuery.Meta.RestTableSchema(RestTableSchema) failed, key \\\"fields\\\" not found\"","name":"source samarth-bigQuery","type":"source"}],"path":"$.args[0].args","error":"Inconsistent object: unexpected exception while connecting to database: GetMetaDecodeProblem \"Error in $.schema: parsing Hasura.Backends.BigQuery.Meta.RestTableSchema(RestTableSchema) failed, key \\\"fields\\\" not found\"","code":"invalid-configuration"},"request_id":"55ba95ae-1f0f-46ea-9cc7-0a061ed931cc","response_size":621,"request_mode":"error"},"request_id":"55ba95ae-1f0f-46ea-9cc7-0a061ed931cc","http_info":{"status":400,"http_version":"HTTP/1.1","url":"/v1/metadata","ip":"122.162.149.191","method":"POST","content_encoding":null}}}``

Screenshots or Screencast

docker-compose file

docker-compose-file

haura console configuration

hasura-console

Please provide any traces or logs that could help here.

hasura-bigQuery   | {"type":"http-log","timestamp":"2022-08-09T14:46:03.105+0000","level":"error","detail":{"operation":{"user_vars":{"x-hasura-role":"admin"},"error":{"internal":[{"definition":"samarth-bigQuery","reason":"Inconsistent object: unexpected exception while connecting to database: GetMetaDecodeProblem \"Error in $.schema: parsing Hasura.Backends.BigQuery.Meta.RestTableSchema(RestTableSchema) failed, key \\\"fields\\\" not found\"","name":"source samarth-bigQuery","type":"source"}],"path":"$.args[0].args","error":"Inconsistent object: unexpected exception while connecting to database: GetMetaDecodeProblem \"Error in $.schema: parsing Hasura.Backends.BigQuery.Meta.RestTableSchema(RestTableSchema) failed, key \\\"fields\\\" not found\"","code":"invalid-configuration"},"request_id":"55ba95ae-1f0f-46ea-9cc7-0a061ed931cc","response_size":621,"request_mode":"error"},"request_id":"55ba95ae-1f0f-46ea-9cc7-0a061ed931cc","http_info":{"status":400,"http_version":"HTTP/1.1","url":"/v1/metadata","ip":"122.162.149.191","method":"POST","content_encoding":null}}}``

Any possible solutions?

NA

Can you identify the location in the source code where the problem exists?

NA

If the bug is confirmed, would you be willing to submit a PR?

Yes

Keywords

BigQuery, RestTableSchema, fields not found

radhay-samagra avatar Aug 09 '22 14:08 radhay-samagra

@radhay-samagra I just followed the steps in the docs with v2.9 and can connect to BigQuery just fine. So I am unable to reproduce. Any chance you can share the metadata for this project so we can investigate further?

codedmart avatar Aug 18 '22 16:08 codedmart

Converting this to a discussion so you can continue the conversation, @radhay-samagra 👍

robertjdominguez avatar Aug 25 '22 12:08 robertjdominguez