创建 Hive 视图 - 关闭 Hive Metastore 中的元数据查找
是否可以在不存在的配置单元表或视图之上创建配置单元视图?这一能力将帮助我们在刷新时(将表或视图从一个环境迁移到另一个环境)时无需任何顺序地部署 Hive DDL。在我们的环境中,我们的视图建立在另一个视图之上。如果我们以任何顺序部署它们,则在默认设置下,某些视图可能会失败,并表示基础表/视图不存在。看看我们是否可以关闭来自 hive 元存储的元数据查找,以便在创建视图时不进行类型检查。它可以在部署之后或在查询视图以进行数据检索时强制执行,因为到那时所有视图/表都将完全部署,并且不会出现任何类型检查相关的错误。
我在互联网上检查了指针,但找不到任何提示。这方面的任何建议都会对我们有所帮助。
提前致谢。
Is it possible to create a hive view on top of a nonexistent hive table or views?. This ability will help us deploy the hive DDL without any order at the time of refresh (migrating tables or views from one environment to another). In our environment, we have views built on top of another view. If we deploy them in any order, with the default setup some of the views may fail saying the underlying table/view doesn't exist. Looking to see if we can turn off the metadata lookup from hive metastore so that the type checks are not done at the time of view creation. It can be enforced after the deployment or at the time of querying the view for data retrieval because by that time all the views/tables will be completely deployed and there won't be any type checking related errors.
I checked on the internet for pointers but I couldn't find any. Any suggestions in this regard will be helpful to us.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 IF NOT EXISTS 添加到所有创建语句并运行多次,直到错误消失。
如果像这样以错误的顺序执行两次,第二次运行将成功,不会出现任何错误:
Add IF NOT EXISTS to all create statements and run all several times until errors disappear.
If executed 2 times in the wrong order like this, second run will succeed without any error: