CertLumen

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

  • spark is predefined in Databricks; DataFrames are immutable and lazily evaluated.
  • Read with spark.read.format(...).option(...).schema(...).load(path) or spark.read.table('catalog.schema.table').
  • CSV defaults: no header, every column STRING; inferSchema adds an extra pass — prefer explicit schemas in production.
  • Parse modes: PERMISSIVE (default; bad fields → NULL / _corrupt_record), DROPMALFORMED, FAILFAST.
  • F.col references a column, F.lit wraps a constant, F.expr embeds 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?

  1. AA temp view with CREATE TEMP VIEW recent_orders AS ...
  2. BA new table with CREATE TABLE workspace.dea_lab.recent_orders AS SELECT ...
  3. CA view with CREATE VIEW workspace.dea_lab.recent_orders AS SELECT ...
  4. 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

← Previous objective · All 29 objectives · Next objective →