Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Machine Learning Professional All Questions

View all questions & answers for the Certified Machine Learning Professional exam

Exam Certified Machine Learning Professional topic 1 question 7 discussion

Actual exam question from Databricks's Certified Machine Learning Professional
Question #: 7
Topic #: 1
[All Certified Machine Learning Professional Questions]

A data scientist wants to remove the star_rating column from the Delta table at the location path. To do this, they need to load in data and drop the star_rating column.
Which of the following code blocks accomplishes this task?

  • A. spark.read.format(“delta”).load(path).drop(“star_rating”)
  • B. spark.read.format(“delta”).table(path).drop(“star_rating”)
  • C. Delta tables cannot be modified
  • D. spark.read.table(path).drop(“star_rating”)
  • E. spark.sql(“SELECT * EXCEPT star_rating FROM path”)
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
BokNinja
Highly Voted 11 months, 1 week ago
A. spark.read.format(“delta”).load(path).drop(“star_rating”)
upvoted 7 times
...
sindhu_gowda
Most Recent 5 months, 2 weeks ago
Selected Answer: A
A is correct
upvoted 1 times
...
Alishahab70
9 months, 3 weeks ago
A is correct, if it was table_name instead of table_path then D would be correct
upvoted 2 times
...
spaceexplorer
9 months, 4 weeks ago
Selected Answer: D
D is correct:
upvoted 1 times
...
hugodscarvalho
10 months ago
Selected Answer: A
This code reads the Delta table located at path, loads it into a DataFrame, and then drops the "star_rating" column from the DataFrame.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...