RAND(n) (Lakehouse v1)
Returns a random floating-point value v in the range 0 <= v < 1.0. To obtain a random integer R in the range i <= R < j, use the expression FLOOR(i + RAND() * (j − i)). Argument n is used as the seed value. For equal argument values, RAND(n) returns the same value each time , and thus produces a repeatable sequence of column values.
Analyze Syntax
Section titled “Analyze Syntax”func.rand( <n>)Analyze Examples
Section titled “Analyze Examples”func.rand(1)
┌────────────────────┐│ func.rand(1) │├────────────────────┤│ 0.7133693869548766 │└────────────────────┘SQL Syntax
Section titled “SQL Syntax”RAND( <n>)SQL Examples
Section titled “SQL Examples”SELECT RAND(1);
┌────────────────────┐│ rand(1) │├────────────────────┤│ 0.7133693869548766 │└────────────────────┘