0

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?

Gopick
  • 61
  • 5

1 Answers1

1

You probably want to use Snowflake's Time Travel feature. Have a look at the documentation here

NickW
  • 8,430
  • 2
  • 6
  • 19
  • Thanks for pointing that out. I have considered this option before asking the question and I wanted to avoid orchestration on the client side if possible. – Gopick Jul 11 '23 at 06:06
  • From your comment it sounds like there are some requirements any solution needs to meet that you haven’t mentioned in your question. It might be useful if you updated your question with a full description of what you are trying to achieve I.e. the problem rather than the solution – NickW Jul 11 '23 at 07:11