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”)
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
...
Log in to ExamTopics
Sign in:
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.
BokNinja
Highly Voted 11 months, 1 week agosindhu_gowda
Most Recent 5 months, 2 weeks agoAlishahab70
9 months, 3 weeks agospaceexplorer
9 months, 4 weeks agohugodscarvalho
10 months ago