フリー問題

SnowPro Specialty: Snowpark のフリー問題 11 / 20 問目

問題文

A team needs the latest row per key from a stream of updates, keeping all the columns, before merging into a target. Which approach is both correct and expressible in the DataFrame API?

選択肢

  1. Sort the whole DataFrame by the timestamp and then take the first row, because a sort makes the first row the most recent one for every key at the same time.
  2. Remove duplicates continuously on the key column and on its plain column cast, which keeps the most recent row.
  3. Add a rank over a window partitioned by the key and ordered by the timestamp, then keep the rows whose rank is one.
  4. Group by the key and by its type cast of a query in it and take the maximum timestamp, which yields the latest row with all its columns.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。