英文:
Run two select statements on the same isolated table snapshot in Snowflake
问题
我需要在一个表上运行两个查询语句。我希望第二个查询语句在第一个查询已经运行的相同数据快照上运行。我想忽略这两个查询语句之间可能发生的写操作。如何正确处理这个情况?
Snowflake是否支持快照隔离?这个社区答案似乎暗示支持,而官方文档似乎只支持读已提交隔离级别。将这两个查询语句放在一个事务中是否确保它们看到相同的数据?
英文:
I need to run two select statements on a table. I want the second select statement to run on the same data snapshot that the first one has run on. I want to ignore the writes that could have happened between these select statements. What's the right way to go about it?
Does Snowflake support Snapshot Isolation? This community answer seems to suggest it does, and the offical docs seem to suggest that it only supports Read committed isolation. Does keeping these two select statements in a transaction ensures they will see the same data?
答案1
得分: 1
你可能想要使用Snowflake的时间旅行功能。请查看此处的文档。
英文:
You probably want to use Snowflake's Time Travel feature. Have a look at the documentation here
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论