title: Better control over table locking in snowflake
body: <p>We have a need to run multiple merge statements on the same table in Snowflake. One of the challenges we face right now is the fact that each merge statement (that results into updates) seems to block the other merges. 
  Each of the merge statements deals with data that belongs to a non-overlapping Key column, aka Tenant. The data volume is unevenly spread between the tenants.</p>
  
  <p>So we thought, that maybe if we cluster the table using the Tenant as the Clustering Key (I read documentation that says Clustering doesn't help on smaller tables, but I thought I will give it a shot anyways), we will end up having a micropartition per Tenant and hence the blocking on updates would no longer happen. But we notice that the clustering key does not guarantee a unique micropartition per Tenant. Unfortunately, as expected, there were only 23 partitions for 100's of tenants, and blocking continued.</p>
  
  <p>On inspecting the lock, we see its held on PARTITIONS(i'm assuming its the micropartition.)</p>
  
  <p><a href="https://i.stack.imgur.com/ppKfi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ppKfi.png" alt="enter image description here"></a></p>
  
  <p>I was wondering if there is any mechanism in Snowflake that can improve blocking on updates OR a way to control the data that goes into a micropartition.</p>