Skip to content

Snowflake database sync failures #15733

Open
@jonfairbanks

Description

@jonfairbanks

Provide the Bytebase version you are using

3.5.x

Describe the bug

After onboarding a Snowflake instance and granting permissions recommended in Bytebase UI, syncing the database gives the following error:

Image
/bytebase.v1.InstanceService/SyncInstance UNKNOWN: failed to sync instance: snowflake: failed to execute query "\n\t\tSELECT\n\t\t\tGRANTEE_NAME,\n\t\t\tROLE\n\t\tFROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS\n\t": 002003 (02000): SQL compilation error:
Schema 'SNOWFLAKE.ACCOUNT_USAGE' does not exist or not authorized.
The backend server may be unavailable

If the same user is used to repeat this query in Snowflake, we are able to confirm that SNOWFLAKE.ACCOUNT_USAGE does exist and the user has appropriate permission to execute this query.

Image

Steps to reproduce

  1. Onboard a Snowflake instance via Bytebase UI
  2. Create a database user and grant granular permissions based on the instructions in the Snowflake instance UI
  3. From the instances view (/instances), check the previously onboarded Snowflake instance
  4. Select Sync instance > Sync all databases

Expected behavior

Databases and schema should be able to be synced from Snowflake databases without error

Provide the database you are using

Snowflake

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions