CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 79: Databricks Certified Associate Developer for Apache Spark

The code block shown below contains an error. The code block is intended to return the exact number of distinct values in column division in DataFrame storesDF. Identify the error. Code block:storesDF.agg(approx_count_distinct(col(“division”)).alias(“divisionDistinct”))

Nội dung câu hỏi

The code block shown below contains an error. The code block is intended to return the exact number of distinct values in column division in DataFrame storesDF. Identify the error. Code block:storesDF.agg(approx_count_distinct(col(“division”)).alias(“divisionDistinct”))

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. The approx_count_distinct() operation needs a second argument to set the rsd parameter to ensure it returns the exact number of distinct values.
  2. B. There is no alias() operation for the approx_count_distinct() operation's output.
  3. C. There is no way to return an exact distinct number in Spark because the data Is distributed across partitions.
  4. D. The approx_count_distinct()operation is not a standalone function - it should be used as a method from a Column object.
  5. E. The approx_count_distinct() operation cannot determine an exact number of distinct values in a column. — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề