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

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

The code block shown below contains an error. The code block intended to return a DataFrame containing a column dayOfYear, an integer representation of the day of the year from column openDate from DataFrame storesDF. Identify the error. Note that column openDate is of type integer and represents a date in the UNIX ep…

Nội dung câu hỏi

The code block shown below contains an error. The code block intended to return a DataFrame containing a column dayOfYear, an integer representation of the day of the year from column openDate from DataFrame storesDF. Identify the error. Note that column openDate is of type integer and represents a date in the UNIX epoch format – the number of seconds since midnight on January 1st, 1970. A sample of storesDF is displayed below: Code block:storesDF.withColumn("dayOfYear", dayofyear(col("openDate")))

Minh họa câu hỏi

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 dayofyear() operation cannot extract the day of year from a column of type integer – column openDate must first be converted to type Timestamp. — đáp án hiện tại
  2. B. The dayofyear() operation takes a quoted column name rather than a Column object as its first argument – the first argument should be "openDate".
  3. C. The dayofyear() operation cannot extract the day of year from a column of type integer – column openDate must first be converted to type Date.
  4. D. The dayofyear() operation is not applicable in a withColumn() call – the newColumn() operation must be used instead.
  5. E. There is no dayofyear() operation – the day of year number must be extracted using substring utilities.

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ề