Exam SnowPro Advanced Data Engineer All QuestionsBrowse all questions from this exam
Question 26

Which methods will trigger an action that will evaluate a DataFrame? (Choose two.)

    Correct Answer: B, E

    DataFrame.collect() and DataFrame.show() are methods that trigger an action and evaluate a DataFrame. These methods cause the DataFrame to be executed and return results, unlike methods such as random_split(), select(), or col(), which merely define transformations without triggering execution.

Discussion
stopthisnowOptions: BE

https://docs.snowflake.com/en/developer-guide/snowpark/python/working-with-dataframes#performing-an-action-to-evaluate-a-dataframe As mentioned earlier, the DataFrame is lazily evaluated, which means the SQL statement isn’t sent to the server for execution until you perform an action. An action causes the DataFrame to be evaluated and sends the corresponding SQL statement to the server for execution.

Snow_POptions: BE

collect and show are actions, for the rest Spark is just writing down what it needs to do when an action occurs