snowflake.snowpark.functions.getbit¶

snowflake.snowpark.functions.getbit(integer_expr: Union[snowflake.snowpark.column.Column, str], bit_position: Union[snowflake.snowpark.column.Column, str, int]) → Column[source]¶

Returns the bit value at the specified position in an integer expression. The bit position is 0-indexed from the right (least significant bit).

Example:

>>> df = session.create_dataframe([11], schema=["a"])
>>> df.select(getbit("a", 3)).collect()
[Row(GETBIT("A", 3)=1)]
Copy