Forum Discussion
IR with no Collission
- 2 years ago
smpa01 I think you can rely on GUID because the chances of it being a duplicate is extremely low
https://betterexplained.com/articles/the-quick-guide-to-guids/
1/(2^128) * 1/(2^128) = 1/(2^256)
which will return 8.63617e-78 so that's 78 zeroes after decimal and then 8636 so 0.0000000000000000000000000000000000000000000000000000000000000000000000000000008636 which is very low probability of 2 GUIDs being the same.
lbendlin how am I supposed to pass on (let alone know beforehand) the `partition number` dynamically to sql?
Let's assume you have yearly partitions. Then the year would be your multiplier
<year>*1000000 + index
Or if you have monthly partitions
<Year>*1000000+ <Month>*10000 + index
etc
- smpa012 years ago
Community Champion
lbendlin it will not work for me. Partitions are autmatically created by the system and I don't have any access to that. Also, there is now exisitng knowledge to calculate the number partiion created by dataflow to preprocess in sql and dynamicaly pass on to sql. This requires a lot of manual effort and accounting for changing code when the refresh window changes ( assuming there is a way to calculate number partitions). This is not a solution I want to rely upon.