snowflake.snowpark.Session.sql¶
- Session.sql(query: str) DataFrame[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.3.0/src/snowflake/snowpark/session.py#L1157-L1189)¶
Returns a new DataFrame representing the results of a SQL query. You can use this method to execute a SQL statement. Note that you still need to call
DataFrame.collect()to execute this query in Snowflake.- Parameters:
query – The SQL statement to execute.
Example: