You are viewing documentation about an older version (1.16.0). View latest version

snowflake.snowpark.functions.sql_expr

snowflake.snowpark.functions.sql_expr(sql: str) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L318-L327)

Creates a Column expression from raw SQL text. Note that the function does not interpret or check the SQL text.

Example::
>>> df = session.create_dataframe([[1, 2], [3, 4]], schema=["A", "B"])
>>> df.filter("a > 1").collect()  # use SQL expression
[Row(A=3, B=4)]
Copy
Language: English