In this Topic:
List of Functions¶
|HASH||Not a cryptographic hash function; see String & Binary Functions instead.|
|HASH_AGG||Not a cryptographic hash function; see String & Binary Functions instead.|
|SEQ1 / SEQ2 / SEQ4 / SEQ8|
Data Generation Usage Notes¶
Sequences generated by data generation functions are not guaranteed to be ordered and gap-free. This is because the numbers may be generated in parallel, in an unsynchronized fashion.
For more details about sequences in Snowflake, see Using Sequences.
Random Distribution Usage Notes¶
Random distribution functions are deterministic.
Each random distribution function takes a generator expression,
gen, as its last argument. The generator expression,
gen, can be constant or variable:
- If constant, then the result of the random distribution function is constant (unless there are other, variable arguments, which is currently only supported for the RANDSTR function).
- If variable, then the result of the random distribution function is variable.
Generator expressions must be a type 64-bit integer, although implicit conversions are allowed. Any expression that can be converted into a 64-bit integer can be used as a generator expression.
The randomness of any random distribution function is directly linked to the randomness of its generator expression. For most practical purposes, the RANDOM data generation function is the best choice for randomly-generated integer values.