Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Associate Developer for Apache Spark · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- cast(dataType) accepts either a DataType instance (IntegerType()) or a DDL type string ('int') — both A and B work. astype(dataType) (pyspark.sql.Column.astype, added in Spark 1.4.0) is a documented alias for cast() and accepts the same arguments, so C also works. cast is the more commonly used/canonical name, but astype is not incorrect.