Snowflake support for Snapshots

When running the liquibase dbDoc or snapshot command, I’m getting this error with version 3.10.2.

liquibase.exception.UnexpectedLiquibaseException: Don't know how to query for sequences on DEV_APP @ jdbc:snowflake://dev.us-east-1.snowflakecomputing.com:443/ (Default Schema: MY_DATABASE)

Based on my review the Liquibase source code and of the Snowflake Sequences docs I don’t think Liquibase supports the dbDoc or snapshot commands.

I know that you guys recently listed Snowflake as a support database. Should I submit this as bug or consider this an unsupported feature for now?

Hi @scottinsurance,
did you have integrated the following https://github.com/liquibase/liquibase-snowflake/releases ?

Yes, I included that I’m using 3.10.2

Hi @scottinsurance,
i tested it successfully with liquibase 3.10.2, and liquibase-snowflake-3.10.2.jar or liquibase-snowflake-4.0.0.jar and using the following properties:
defaultSchemaName: PUBLIC
defaultCatalogName: DEMO_DB
includeSchema: true
includeCatalog: true

and my conn string url: jdbc:snowflake://gi78848.eu-central-1.snowflakecomputing.com/?db=DEMO_DB&schema=PUBLIC

i updated the db with different changesets and i used liquibase dbDoc .

Check permissions on snowflake and take care of naming case.

I reproduced the error with the configuration that creates liquibase tables on a separate schema and the other tables on PUBLIC schema

Thanks, I initially thought it might be a permissions issue. I’m a developer so I don’t have the ability to changes these easily. Any idea what permissions we’d need? SHOW, ALTER, DESCRIBE, or CREATE SEQUENCES;

Are these necessary includeSchema and includeCatalog? I see they are used for generated changesets.

@costinmoraru Any idea what permissions we’d need for Snowflake to run the snapshot and dbdocs commands?

Hi @scottinsurance,
first of all you need to manage permissions inside snowflake console starting from db.

.
Make sure you have granted required privileges to table child and other elements.
Second, i found 2 issues that prevent dbdoc and snapshot to execute correctly, i fixed on a PR.


Please comment it to request the merge on the next liquibase release.
3 Likes