snowflake.snowpark.functions.seq1

snowflake.snowpark.functions.seq1(sign: int = 0) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L1562-L1579)

Returns a sequence of monotonically increasing integers, with wrap-around which happens after largest representable integer of integer width 1 byte.

Parameters:

sign – When 0, the sequence continues at 0 after wrap-around. When 1, the sequence continues at smallest representable 1 byte integer. Defaults to 0.

See also

  • Session.generator(), which can be used to generate in tandem with seq1 to

    generate sequences.

Example::
>>> df = session.generator(seq1(0), rowcount=3)
>>> df.collect()
[Row(SEQ1(0)=0), Row(SEQ1(0)=1), Row(SEQ1(0)=2)]
Copy
语言: 中文