Databricks Data Engineer Associate · Section 3 · 22% of the exam
Manipulate columns, rows, and table structures by adding, dropping, splitting, renaming column names, applying filters, and exploding arrays.
One of the objectives of the Databricks Certified Data Engineer Associate exam, in the section “Data Transformation and Modeling”. Here is what it covers, the points to remember and a question to try.
What it covers
The PySpark DataFrame API from zero: the SparkSession, reading files and tables with options and schemas, data types, column expressions with select/withColumn/filter/col/lit/expr, the functions module, display vs show, and writing tables with save modes.
Points to remember
sparkis predefined in Databricks; DataFrames are immutable and lazily evaluated.- Read with
spark.read.format(...).option(...).schema(...).load(path)orspark.read.table('catalog.schema.table'). - CSV defaults: no header, every column STRING;
inferSchemaadds an extra pass — prefer explicit schemas in production. - Parse modes: PERMISSIVE (default; bad fields → NULL /
_corrupt_record), DROPMALFORMED, FAILFAST. F.colreferences a column,F.litwraps a constant,F.exprembeds SQL; combine conditions with&,|,~and parentheses.
Try a question
Analysts in several teams need to query a filtered subset of workspace.dea_lab.orders from their own sessions, with access controlled in Unity Catalog. The subset must always reflect the current table, and no copy of the data should be stored. What should the data engineer create?
- AA temp view with
CREATE TEMP VIEW recent_orders AS ... - BA new table with
CREATE TABLE workspace.dea_lab.recent_orders AS SELECT ... - CA view with
CREATE VIEW workspace.dea_lab.recent_orders AS SELECT ... - DA global temp view with
CREATE GLOBAL TEMP VIEW recent_orders AS ...
Show the answer
C. A permanent view is stored in Unity Catalog as a named query. It holds no data, re-runs against the current base table whenever it is queried, and can be granted to other users. Temp and global temp views aren't catalog objects and can't be shared across users this way, while CTAS creates a static copy.
Written for practice in the style of the exam: never a question from the real exam.
In the course
3 lessons teach this objective: PySpark DataFrame Essentials, Spark SQL Essentials, Column, Row & Structure Manipulation (about 135 minutes), and 22 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Implement data cleaning by reading bronze tables with PySpark/SQL, cleaning nulls, standardizing data types, and writing to new silver tables.
- Combine DataFrames with operations such as Inner join, left join, broadcast join, multiple keys, cross join, union, and union all.
- Perform data deduplication operations and aggregate operations on DataFrames, such as count, approximate count distinct, and mean, summary.
- Understand the basic tuning parameters (spark.sql.shuffle.partitions, spark.default.parallelism, spark.executor/driver.memory, spark.sql.autoBroadcastJoinThreshold) and re-measure the performance.
- Understand the difference between, and how to build, Gold layer objects such as materialized views, views, streaming tables, and tables for BI and analytics teams in Unity Catalog.
- Apply data quality checks and validation rules to ensure reliable Silver and Gold datasets.