Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 10 of 38
Free Preview · 38 of 126 · questions 1–38 of 126 are free. Sign up free to sync your progress across devices.
Select 3 answers.
This question asks for 3 answers, but our data marks only 1. Compare with the community discussion below for the full answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
• To create a DataFrame to hold the data from a file in a stage, use the read property to get a DataFrameReader object. In the DataFrameReader object, call the method corresponding to the format of the data in the file: # Create DataFrames from data in a stage. df_json = session.read.json("@my_stage2/data1.json") • To create a DataFrame to hold the results of a SQL query, call the sql method: # Create a DataFrame from a SQL query df_sql = session.sql("SELECT name from sample_product_data") • To create a DataFrame from data in a table, view, or stream, call the table method: # Create a DataFrame from the data in the "sample_product_data" table. df_table = session.table("sample_product_data")
https://docs.snowflake.com/en/developer-guide/snowpark/python/working-with-dataframes
df = session.sql("select 1/2") https://docs.snowflake.com/en/developer-guide/snowpark/reference/python/latest/api/snowflake.snowpark.DataFrame