首页 > 解决方案 > Liquibase Snowflake 集成 - 具体来说:generateChangeLog

问题描述

调用时:mvn liquibase:generateChangeLog 我收到此错误:

*Object 'DATAWAREHOUSE_DB_DEV.INFORMATION_SCHEMA.CONSTRAINTS' does not exist or not authorized.* 

有没有人找到解决此问题的方法?Snowflake 似乎有一个视图 DATAWAREHOUSE_DB_DEV.INFORMATION_SCHEMA.TABLE_CONSTRAINTS 但 Snowflake 不支持同义词,您无法在 INFORMATION_SCHEMA 中创建任何新视图(以匹配 liquibase 正在寻找的内容)。

标签: liquibasesnowflake-cloud-data-platform

解决方案


在我看来,这就像 Liquibase 版本问题或类似问题。

如果您确实需要一种解决方法,您能否在不同的架构中创建一个适用于您的解决方案的视图?

类似于:

create view public.constraints(constraint_catalog, constraint_schema, constraint_name) as (
      -- Start at the top of the hierarchy ...
      select constraint_catalog, constraint_schema, constraint_name
        from information_schema.table_constraints
  );

select * from public.constraints;

推荐阅读