Get schema compatibility
The Depot CLI command get-schema-compatibility (alias: gsc) is specifically for use with regard to Snowflake. It will get Snowflake schema and database compatibility for a target schema compared to the current environment's schema, and display any differences, as well as propose resolutions as DDL or manual steps.
Usage
# Check schema compatibility and format results with the default JSON, text, or sql formats.
depot gsc --dataset 4d1880e0017c --schema /Users/user/Git/some-package/src/example-changes
depot gsc --dataset 4d1880e0017c --schema /Users/user/Git/some-package/src/example-changes --format text
depot gsc --dataset 4d1880e0017c --schema /Users/user/Git/some-package/src/example-changes --format sql
Results with information relating to the compatibility between the current and target schemas will be displayed as JSON by default, however you can also alter the output using the text or sql format switches.
Sample output for a new object field named foo, added to a schema package that has not yet been deployed (or created) in the target environment (displayed with text formatting):
[ERROR]: dataset '29011122d795' with location '76448cf51ae9' has MISSING_FIELD for foo
[manual resolution]: create field "FOO" in table "EXAMPLE_SOURCE"."MY_CONTACTS"."PERSON"
[ddl resolution]: alter table "EXAMPLE_SOURCE"."MY_CONTACTS"."PERSON" add "FOO" varchar not null
[ERROR]: dataset '29011122d795' with location '76448cf51ae9' has MISSING_FIELD for foo
[manual resolution]: create field "FOO" in table "EXAMPLE_SOURCE"."MY_CONTACTS_HISTORY"."PERSON"
[ddl resolution]: alter table "EXAMPLE_SOURCE"."MY_CONTACTS_HISTORY"."PERSON" add "FOO" varchar not null