nerdexam
Snowflake

SOL-C01 · Question #297

In a Snowflake Notebook, you're attempting to read data from a Snowflake table named 'CUSTOMER DATA into a Pandas DataFrame for further analysis. The table contains a column named of data type…

The correct answer is A. Option A D. Option D. Options A and D are the most efficient and correct. automatically handles the conversion of Snowflake TIMESTAMP NTZ to Pandas datetime objects. Option D `pd.read_sqr using the connection context is also good , which handles the conversion automatically as well. Option B fetches…

Querying and Performance

Question

In a Snowflake Notebook, you're attempting to read data from a Snowflake table named 'CUSTOMER DATA into a Pandas DataFrame for further analysis. The table contains a column named of data type TIMESTAMP NTZ. Which of the following Python code snippets will successfully read the data and preserve the 'CREATED_AT column as a datetime object in the DataFrame?

Exhibit

SOL-C01 question #297 exhibit

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E

How the community answered

(21 responses)
  • A
    71% (15)
  • B
    14% (3)
  • C
    10% (2)
  • E
    5% (1)

Explanation

Options A and D are the most efficient and correct. automatically handles the conversion of Snowflake TIMESTAMP NTZ to Pandas datetime objects. Option D `pd.read_sqr using the connection context is also good , which handles the conversion automatically as well. Option B fetches the data as tuples, requiring manual column naming and datetime conversion, and it is inefficient. Option C requires to work correctly. Option E cast timestamp column explicitly and defeats purpose.

Topics

#Snowflake Notebooks#Pandas integration#Data retrieval#Datetime handling

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice