Databricks Associate-Developer-Apache-Spark Prüfungsthemen:
| Abschnitt | Ziele |
|---|---|
| Thema 1: Spark SQL | - SQL-Abfragen in Spark
|
| Thema 2: Apache Spark Architektur und Grundlagen | - Überblick über die Spark-Architektur
|
| Thema 3: Datenerfassung und Speicherformate | - Lesen und Schreiben von Daten
|
| Thema 4: Transformationen und Aktionen | - Kernoperationen mit RDD/DataFrame
|
| Thema 5: Spark DataFrame API | - Operationen mit DataFrames
|
| Thema 6: Grundlagen der Leistung und Optimierung | - Optimierungskonzepte
|
Databricks Certified Associate Developer for Apache Spark 3.0 Associate-Developer-Apache-Spark Prüfungsfragen mit Lösungen
1. Which of the following code blocks returns a new DataFrame with the same columns as DataFrame transactionsDf, except for columns predError and value which should be removed?
A) transactionsDf.drop("predError", "value")
B) transactionsDf.drop(predError, value)
C) transactionsDf.drop("predError & value")
D) transactionsDf.drop(col("predError"), col("value"))
E) transactionsDf.drop(["predError", "value"])
2. Which of the following code blocks produces the following output, given DataFrame transactionsDf?
Output:
1.root
2. |-- transactionId: integer (nullable = true)
3. |-- predError: integer (nullable = true)
4. |-- value: integer (nullable = true)
5. |-- storeId: integer (nullable = true)
6. |-- productId: integer (nullable = true)
7. |-- f: integer (nullable = true)
DataFrame transactionsDf:
1.+-------------+---------+-----+-------+---------+----+
2.|transactionId|predError|value|storeId|productId| f|
3.+-------------+---------+-----+-------+---------+----+
4.| 1| 3| 4| 25| 1|null|
5.| 2| 6| 7| 2| 2|null|
6.| 3| 3| null| 25| 3|null|
7.+-------------+---------+-----+-------+---------+----+
A) transactionsDf.rdd.printSchema()
B) transactionsDf.rdd.formatSchema()
C) transactionsDf.printSchema()
D) transactionsDf.schema.print()
E) print(transactionsDf.schema)
3. The code block displayed below contains an error. The code block should trigger Spark to cache DataFrame transactionsDf in executor memory where available, writing to disk where insufficient executor memory is available, in a fault-tolerant way. Find the error.
Code block:
transactionsDf.persist(StorageLevel.MEMORY_AND_DISK)
A) Caching is not supported in Spark, data are always recomputed.
B) Data caching capabilities can be accessed through the spark object, but not through the DataFrame API.
C) The code block uses the wrong operator for caching.
D) The storage level is inappropriate for fault-tolerant storage.
E) The DataFrameWriter needs to be invoked.
4. The code block displayed below contains an error. The code block is intended to write DataFrame transactionsDf to disk as a parquet file in location /FileStore/transactions_split, using column storeId as key for partitioning. Find the error.
Code block:
transactionsDf.write.format("parquet").partitionOn("storeId").save("/FileStore/transactions_split")A.
A) The format("parquet") expression should be removed and instead, the information should be added to the write expression like so: write("parquet").
B) Partitioning data by storeId is possible with the partitionBy expression, so partitionOn should be replaced by partitionBy.
C) The format("parquet") expression is inappropriate to use here, "parquet" should be passed as first argument to the save() operator and "/FileStore/transactions_split" as the second argument.
D) partitionOn("storeId") should be called before the write operation.
E) Partitioning data by storeId is possible with the bucketBy expression, so partitionOn should be replaced by bucketBy.
5. Which of the following code blocks returns DataFrame transactionsDf sorted in descending order by column predError, showing missing values last?
A) transactionsDf.sort("predError", ascending=False)
B) transactionsDf.desc_nulls_last("predError")
C) transactionsDf.orderBy("predError").asc_nulls_last()
D) transactionsDf.orderBy("predError").desc_nulls_last()
E) transactionsDf.sort(asc_nulls_last("predError"))
Fragen und Antworten:
| 1. Frage Antwort: A | 2. Frage Antwort: C | 3. Frage Antwort: D | 4. Frage Antwort: B | 5. Frage Antwort: A |






843 Kundenbewertungen

