Cloudera Machine Learning Engineer study materials
Cloudera Machine Learning Engineer study resources

Cloudera Machine Learning Engineer practice questions

One question at a time. Build your Cloudera Machine Learning Engineer understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Machine Learning Workbench and Project Setup

In Cloudera Machine Learning, what is the primary purpose of a project?

  1. To group related files, sessions, jobs, and collaborators under a shared workspace Correct answer.
  2. To store only the trained model artifacts produced by production jobs
  3. To configure the cluster's YARN resource queues for all tenants
  4. To define the Kerberos principals used by the CDP Data Lake

Explanation

A CML project is the container for a data science effort: it holds files, sessions, jobs, models, and collaborator access in one workspace. Other cluster-level concerns such as YARN queues and Kerberos principals are administered outside the project.

Question 2Machine Learning Workbench and Project Setup

A data scientist wants an interactive environment in CML to explore data with a notebook and a Python kernel. Which CML capability should they launch?

  1. A session Correct answer.
  2. A model build
  3. A job
  4. A data connection

Explanation

Sessions provide the interactive compute environment where users run notebooks and scripts with a chosen kernel and engine. Jobs are for scheduled or batch execution, models serve deployed artifacts, and data connections store external access credentials.

Question 3Machine Learning Workbench and Project Setup

Which component of a CML project determines the language runtime, installed libraries, and compute resources available when a session starts?

  1. The engine selected for the session Correct answer.
  2. The project's Git remote URL
  3. The project's collaborator role
  4. The project's data connection

Explanation

The engine bundles the operating system, language runtime, and preinstalled libraries, and it is paired with a resource profile at session launch. Git remotes, collaborator roles, and data connections do not define the runtime environment.

Question 4Machine Learning Workbench and Project Setup

What is the role of a resource profile when launching a CML session or job?

  1. It sets the CPU, memory, and optionally GPU allocated to the workload Correct answer.
  2. It determines the retention period for job run history
  3. It defines which users may view the project
  4. It selects the Git branch that will be checked out

Explanation

Resource profiles describe the compute shape, such as CPU cores, memory, and GPU count, assigned to a session or job. Branch selection, access control, and history retention are handled by other project settings.

Question 5Machine Learning Workbench and Project Setup

A team wants every new session in a project to start from the same set of Python packages without rebuilding the environment each time. What is the most direct CML mechanism?

  1. Add the packages to a project-specific engine customization and use that engine Correct answer.
  2. Ask each user to install packages in their own home directory
  3. Create a new data connection listing the package names
  4. Commit a requirements file and manually pip install after each session starts

Explanation

CML supports customizing an engine with additional libraries so that sessions and jobs using that engine start with the packages already present. Manual per-session installs or per-user installs do not give a consistent shared environment.

Question 6Machine Learning Workbench and Project Setup

When creating a CML project, a user supplies a Git repository URL. What does this enable?

  1. Direct SQL access to the Data Warehouse
  2. Encryption at rest for all project files
  3. Version-controlled tracking of project files with push and pull to the remote Correct answer.
  4. Automatic Kerberos ticket renewal for the project

Explanation

Linking a Git remote lets the project track file changes under version control and synchronize commits with the remote repository. It does not handle Kerberos, storage encryption, or warehouse SQL access.

Question 7Machine Learning Workbench and Project Setup

Which CML project role is intended for a user who should be able to run sessions and edit files but not manage collaborator access?

  1. Owner
  2. Viewer
  3. Editor Correct answer.
  4. Cluster administrator

Explanation

Editors can work with project content such as files, sessions, and jobs but do not control membership. Owners manage collaborators and project settings, while viewers have read-only access.

Question 8Machine Learning Workbench and Project Setup

A user needs a session that runs a long interactive exploration and must persist state across several days. Which consideration matters most in CML?

  1. Sessions cannot use GPUs
  2. Sessions are automatically converted to jobs after one hour
  3. Sessions stop after an idle timeout, so the user should expect the session to be stopped and restarted Correct answer.
  4. Sessions delete project files when they stop

Explanation

CML sessions are subject to idle timeouts and can be stopped to free resources, so long-running interactive work should be planned around restarts. Session stop does not delete project files, and sessions can use GPU profiles.

Question 9Machine Learning Workbench and Project Setup

What does a CML data connection primarily store?

  1. Connection details and credentials for accessing an external data source Correct answer.
  2. The project's Git commit history
  3. The full contents of an external database
  4. The resource profile used by jobs

Explanation

A data connection records the endpoint, parameters, and credentials needed to reach an external system so sessions and jobs can use it without hardcoding secrets. It does not copy the external database or store runtime or Git metadata.

Question 10Machine Learning Workbench and Project Setup

A data scientist wants to schedule a Python script to retrain a model every night without keeping an interactive session open. Which CML feature fits?

  1. A job with a schedule Correct answer.
  2. A session with a long idle timeout
  3. A project collaborator invitation
  4. A model endpoint

Explanation

Jobs run project code non-interactively and can be scheduled to execute on a recurring basis. Sessions are interactive, model endpoints serve predictions, and collaborator invitations control access.

Question 11Machine Learning Workbench and Project Setup

Which statement best describes the relationship between a CML project and its files?

  1. Files must be committed to Git before they can be read by a session
  2. Files can only exist inside a running session and disappear when it stops
  3. Files are stored in the project workspace and can be organized into directories Correct answer.
  4. Files are stored exclusively in the model registry

Explanation

Project files live in the project workspace and support a directory structure that collaborators share. They persist independently of sessions and do not require a Git commit to be readable.

Question 12Machine Learning Workbench and Project Setup

A team wants to reuse the same engine customization across several projects. What is the recommended approach?

  1. Copy the package files into every session at runtime
  2. Create a shared engine customization available to the relevant projects and select it at launch Correct answer.
  3. Add the packages to each project's README
  4. Recreate the customization manually in each project

Explanation

Engine customizations can be defined and made available for reuse, so multiple projects can select the same runtime rather than rebuilding it. Manual recreation or README documentation does not deliver an installed environment.

Question 13Machine Learning Workbench and Project Setup

What happens when a user launches a session in a project whose Git remote has newer commits than the workspace?

  1. The user can pull the remote changes to synchronize the workspace Correct answer.
  2. The remote commits are silently discarded
  3. The project is automatically deleted and recreated
  4. The workspace is always force-overwritten without warning

Explanation

CML exposes Git operations so users can pull remote changes into the project workspace and push local commits. It does not silently discard remote work or force-overwrite without user action.

Question 14Machine Learning Workbench and Project Setup

Which item is a valid reason to create a separate CML project rather than adding files to an existing one?

  1. To avoid configuring a resource profile
  2. To isolate a distinct use case with its own collaborators, jobs, and access controls Correct answer.
  3. To change the cluster's Kerberos realm
  4. To increase the cluster's total CPU capacity

Explanation

Projects are the unit of collaboration and resource organization, so separating a distinct use case keeps permissions, jobs, and content scoped appropriately. Creating projects does not add cluster capacity or alter security realms.

Question 15Machine Learning Workbench and Project Setup

A user reports that a session fails immediately after launch. Which project-level setting should be checked first?

  1. The number of collaborators
  2. The names of files in the data directory
  3. The project's description text
  4. The selected engine and resource profile Correct answer.

Explanation

Launch failures commonly stem from an unavailable engine or an unsatisfiable resource profile, so those settings should be verified first. Descriptions, collaborator counts, and file names do not determine whether a session can start.

Question 16Machine Learning Workbench and Project Setup

Which statement about model deployments in CML is accurate?

  1. A model must be built from a project file and then deployed to create a serving endpoint Correct answer.
  2. Models can only be deployed from jobs
  3. A model endpoint runs inside an interactive session
  4. Deploying a model requires the project to have no Git remote

Explanation

The deployment workflow creates a model build from project code or an artifact and then deploys that build to a serving endpoint. Endpoints are independent of interactive sessions, and Git remotes or job-only restrictions do not apply.

Question 17Machine Learning Workbench and Project Setup

A collaborator should be able to view project files and job results but must not launch sessions or modify content. Which role assignment meets this requirement?

  1. Creator
  2. Editor
  3. Viewer Correct answer.
  4. Owner

Explanation

The viewer role grants read-only visibility into project content such as files and job results without permitting edits or new sessions. Editor and owner roles grant broader capabilities than the requirement allows.

Question 18Machine Learning Workbench and Project Setup

How does CML use the concept of a kernel within a session?

  1. It sets the maximum number of CPU cores for the session
  2. It determines the retention of job run logs
  3. It defines the language interpreter that executes notebook cells Correct answer.
  4. It stores the Git credentials for the project

Explanation

A kernel is the language-specific interpreter, such as Python or R, that executes notebook code in a session. CPU allocation comes from the resource profile, and Git credentials and log retention are separate concerns.

Question 19Machine Learning Workbench and Project Setup

A team needs to ensure secrets used by a job are not embedded in committed code. Which CML feature supports this?

  1. Committing the secrets to the Git remote
  2. Writing the secrets in the job's script comments
  3. Storing the secrets in a data connection or project environment variables Correct answer.
  4. Placing the secrets in the project description

Explanation

Secrets should be supplied through data connections or environment variables so they are not written into version-controlled files. Committing, commenting, or describing secrets exposes them in project metadata.

Question 20Machine Learning Workbench and Project Setup

Which factor most directly limits the size of a session's in-memory data processing?

  1. The length of the project name
  2. The number of files in the project
  3. The memory allocated by the selected resource profile Correct answer.
  4. The number of Git branches

Explanation

In-memory processing is bounded by the memory provided by the resource profile assigned at launch. Project file counts, naming, and branch counts do not change the session's memory allocation.

Question 21Machine Learning Workbench and Project Setup

A project's job must run on a schedule but also needs access to an external database. What should be configured?

  1. A larger project description and a kernel change
  2. A viewer collaborator and a longer session timeout
  3. A data connection attached to the job's environment and a schedule on the job Correct answer.
  4. A new Git remote and a model endpoint

Explanation

A job can use a data connection to obtain external access details and can be given a schedule for recurring execution. Timeouts, collaborators, Git remotes, and descriptions do not provide database access or scheduling.

Question 22Machine Learning Workbench and Project Setup

An administrator wants sessions to use a customized engine that includes an approved library set. Which sequence is correct?

  1. Add libraries to a Git branch, then deploy a model endpoint
  2. Create the engine customization, make it available to the project, then select it when launching sessions Correct answer.
  3. Launch a session, install libraries, then convert the session into a job
  4. Create a data connection, then select it as the session kernel

Explanation

The customization must first be created and made available, after which it can be selected as the engine for sessions and jobs. Installing in a live session or using data connections and branches does not produce a reusable approved environment.

Question 23Machine Learning Workbench and Project Setup

Which situation indicates that a project should use a job rather than an interactive session?

  1. A demonstration of notebook output to a collaborator
  2. An ad hoc debugging run with frequent code edits
  3. A one-time visual exploration of a new dataset
  4. A repeatable pipeline that must run unattended on a defined schedule Correct answer.

Explanation

Jobs are designed for unattended, repeatable execution and can be scheduled or triggered. Interactive exploration, debugging, and notebook demonstrations benefit from the live feedback of a session.

Question 24Machine Learning Workbench and Project Setup

What is the effect of stopping a running CML session?

  1. All project files are permanently deleted
  2. The project's Git remote is removed
  3. Compute resources are released while project files remain stored Correct answer.
  4. The project's collaborators lose their accounts

Explanation

Stopping a session releases the compute resources tied to the resource profile while the project workspace and files persist. It does not delete files, remove Git remotes, or affect user accounts.

Question 25Machine Learning Workbench and Project Setup

A team wants reproducibility for a training job. Which combination best supports that goal?

  1. An open interactive session with libraries installed ad hoc
  2. A project description that lists the library versions
  3. A viewer collaborator who monitors each run
  4. A pinned engine customization, version-controlled project code, and a recorded resource profile Correct answer.

Explanation

Reproducibility requires a stable runtime, versioned code, and a known compute shape, which together let a run be repeated. Ad hoc installs, prose descriptions, and manual monitoring do not guarantee identical conditions.

Question 26Machine Learning Workbench and Project Setup

A new CML project is created and the data scientist wants every session in it to start from the same Python environment with pinned library versions. Which project artifact is the correct place to define that environment?

  1. A job run that installs packages on a nightly schedule
  2. A project-level environment customization applied to the engine used by sessions Correct answer.
  3. A data connection pointing at a package repository
  4. A per-session pip install typed into the terminal after launch

Explanation

CML lets you attach an environment customization to a project so that every session and job launched from it inherits the same engine and dependency set. This makes the runtime reproducible instead of depending on manual steps performed after launch. Installing packages by hand or via a job changes only that instance and does not define the project environment.

Question 27Machine Learning Workbench and Project Setup

A CML project is shared by several teams, and one team's exploratory notebooks are slowing down others who need a clean, stable workspace. Which project design decision addresses this most directly?

  1. Grant every user the project administrator role so they can clean up files
  2. Split the exploratory work into its own project with its own files and collaborators Correct answer.
  3. Move the notebooks into a job that runs on a schedule
  4. Increase the session memory so the notebooks run faster

Explanation

Separating unrelated work into distinct projects isolates files, collaborators, and runtime settings so one team's experiments do not disturb another's stable workspace. Project boundaries are the primary unit of collaboration and access control in CML. Raising resources or converting notebooks to jobs does not separate ownership or access.

Question 28Machine Learning Workbench and Project Setup

Which statement describes how CML ties a project to a Git repository when the project is created from a remote URL?

  1. Git is used only to store job logs, while project files live in an unrelated bucket
  2. The project workspace becomes a clone that can pull and push against the configured remote Correct answer.
  3. The remote repository is copied once and the link is discarded after the initial import
  4. The remote URL is recorded for documentation and has no effect on file tracking

Explanation

Creating a project from a Git URL clones that repository into the project workspace and keeps the remote configured, so users can pull updates and push commits. This is what enables version control of project files alongside the CML runtime. The link is not a one-time copy, a log store, or mere documentation.

Question 29Machine Learning Workbench and Project Setup

A data scientist wants the exact library versions used in a successful experiment to be reusable by colleagues in other projects. What is the most appropriate CML mechanism?

  1. Commit the installed site-packages directory into the project repository
  2. Rely on the default engine, since library versions are always identical
  3. Email the requirements file and ask each colleague to install it manually
  4. Publish the environment as a reusable customization that other projects can select Correct answer.

Explanation

CML environment customizations can be built and then reused across projects, giving colleagues the same engine and dependency set without manual steps. This is the supported way to standardize runtimes across teams. Manual installs and committed package directories are fragile and not how engines are managed.

Question 30Machine Learning Workbench and Project Setup

A user can open a project and read its files and job output but cannot start a session or change any content. Which project role matches this description?

  1. Operator
  2. Administrator
  3. Viewer Correct answer.
  4. Editor

Explanation

The viewer role provides read-only access to project content, including files and job results, without the ability to launch sessions or modify material. Editing, operating, and administering all grant additional capabilities beyond read-only access. Assigning the least privilege needed keeps shared projects controlled.

Question 31Machine Learning Workbench and Project Setup

A user launches a session in a project whose Git remote has commits newer than the local workspace. What is the expected outcome the user should plan for?

  1. The session refuses to start until an administrator resets the repository
  2. The session starts from the local workspace until the user pulls the newer commits Correct answer.
  3. The session silently runs against the remote branch without cloning it locally
  4. The platform automatically overwrites local changes with the remote commits

Explanation

A session runs against the project workspace as it currently exists on disk, so newer remote commits are not applied automatically. The user must pull to bring the workspace up to date, and doing so may require handling local changes. The platform does not force-reset the workspace or run directly from the remote.

Question 32Machine Learning Workbench and Project Setup

A project needs credentials for an external object store so that sessions and jobs can read data without hardcoding keys in notebooks. Which CML feature is intended for this?

  1. An environment variable typed into each notebook cell
  2. A model deployment that exposes the credentials at runtime
  3. A Git submodule that vendors the credentials into the repository
  4. A data connection that stores the endpoint and credentials for reuse Correct answer.

Explanation

Data connections hold the endpoint and credential details for external storage so sessions and jobs can reference them without embedding secrets in code. This keeps sensitive values out of committed files. Submodules, notebook cells, and deployments are not credential stores.

Question 33Machine Learning Workbench and Project Setup

A team must guarantee that a nightly training job reproduces the same result months later. Which combination of CML capabilities best supports that requirement?

  1. An interactive session kept running continuously for the whole period
  2. A shared data connection plus a notebook that is edited in place each week
  3. A pinned environment customization plus the committed code revision used by the job Correct answer.
  4. The largest available session size plus manual notes about library versions

Explanation

Reproducibility requires both the exact runtime and the exact code, so a pinned environment customization combined with a known committed revision covers both. Either element alone leaves one source of variation uncontrolled. Session size, shared connections, and long-running sessions do not pin the runtime or the code.

Question 34Machine Learning Workbench and Project Setup

What determines the compute resources available to an interactive session when it is launched in a CML project?

  1. The retention policy configured on the data connection
  2. The role assigned to the user in the project
  3. The engine and resource profile selected for that session at launch Correct answer.
  4. The number of files committed to the project repository

Explanation

Session capacity comes from the engine plus the resource profile chosen at launch, which together set the image, CPU, and memory. Repository size, project role, and data connection settings do not allocate compute. Users choose these settings to match the workload.

Question 35Machine Learning Workbench and Project Setup

A user wants a script to run on a recurring schedule without an interactive session staying open. Which CML construct should be used?

  1. A model deployment with a fixed replica count
  2. A session left running in the browser tab
  3. A job configured with a schedule and an engine Correct answer.
  4. A project-level data connection

Explanation

Jobs run scripts non-interactively and can be given a schedule so they execute without anyone keeping a session open. Sessions, deployments, and data connections serve different purposes and do not provide scheduled script execution. This is the standard pattern for recurring pipeline steps.

Question 36Machine Learning Workbench and Project Setup

A project administrator wants every new session to start from an approved image that includes security patches. Which sequence is correct?

  1. Attach a data connection to the base image and rely on it to apply patches
  2. Ask each user to rebuild the image manually after every session starts
  3. Build an environment customization from the approved base, then set it as the project's default for sessions Correct answer.
  4. Disable sessions entirely and require users to run everything as jobs

Explanation

The administrator builds an environment customization on top of the approved base and assigns it as the project default, so every new session inherits the patched image. Manual rebuilding per user is error-prone and inconsistent. Disabling sessions or misusing data connections does not deliver a patched runtime.

Question 37Machine Learning Workbench and Project Setup

A collaborator needs to run and monitor jobs in a project but should not be able to add or remove other collaborators. Which role is appropriate?

  1. Editor
  2. Administrator
  3. Viewer
  4. Operator Correct answer.

Explanation

The operator role allows a user to run and manage jobs without granting control over project membership. Viewers cannot run jobs, and administrators can manage collaborators, which exceeds the requirement. Choosing operator applies least privilege for job execution.

Question 38Machine Learning Workbench and Project Setup

A session is stopped by its owner. What is the practical consequence for the work done inside it?

  1. The session is converted into a scheduled job automatically
  2. The session keeps its memory and resumes exactly where it stopped
  3. The project files are deleted along with the session
  4. The session's compute is released and any state held only in memory is lost Correct answer.

Explanation

Stopping a session releases its compute resources, and anything that existed only in the process memory disappears with it. Files saved to the project workspace persist, so important results should be written to disk. The platform does not delete project files or convert the session into a job.

Question 39Machine Learning Workbench and Project Setup

A team wants to know why a session failed immediately at launch while the same code works for a colleague. Which project-level factor is the most likely cause to investigate first?

  1. The data connection has a longer retention period
  2. The Git remote has a longer commit history
  3. The project has more collaborators than the colleague's project
  4. The engine and resource profile attached to the session differ from the colleague's Correct answer.

Explanation

Immediate launch failures usually trace to the runtime configuration, such as an engine that cannot start or a resource profile the user cannot obtain. Comparing the engine and resource profile against a working colleague isolates the difference quickly. Collaborator count, commit history, and connection retention do not prevent a session from starting.

Question 40Machine Learning Workbench and Project Setup

Which statement best describes the relationship between a CML project and the files stored in its workspace?

  1. The workspace is shared globally, so every project sees the same files
  2. The project is the container whose workspace holds files that can be versioned with Git Correct answer.
  3. Each file is an independent project that must be registered separately
  4. Files are stored only in the Git remote and never in the workspace

Explanation

A project acts as the container for a workspace, and the files inside that workspace can be tracked with Git and shared according to project roles. Files are not separate projects, and workspaces are scoped per project rather than global. This container relationship is what makes collaboration and version control coherent.

Question 41Data Access, Ingestion, and Preparation

In Cloudera Machine Learning, which component is the primary place to store and query structured datasets with SQL and share them across projects?

  1. The session's ephemeral container filesystem
  2. The project's local Git repository
  3. The model deployment pod's environment variables
  4. The Data Catalog / Data Warehouse (Impala or Hive tables) Correct answer.

Explanation

Structured, shareable datasets in CML are typically registered as Impala or Hive tables in the data warehouse/catalog so multiple projects and users can query them with SQL. Project Git repositories hold code, container filesystems are ephemeral, and deployment environment variables are configuration, not data storage.

Question 42Data Access, Ingestion, and Preparation

A data engineer wants to ingest a large CSV from an S3 bucket into a CML project for exploratory analysis with pandas. Which approach best fits the platform's ingestion model?

  1. Convert the CSV to a PNG and load it with an image library
  2. Read the object directly from S3 into a pandas DataFrame using an authenticated client Correct answer.
  3. Download the CSV to the session's local disk and commit it to Git
  4. Paste the CSV contents into a notebook cell as a literal

Explanation

CML sessions can authenticate to object storage and read objects directly into pandas or Spark, avoiding copying large files into Git. Committing data to Git bloats the repo, and pasting or converting to images is not a viable ingestion path.

Question 43Data Access, Ingestion, and Preparation

Which file format is generally preferred for columnar analytics in the Cloudera data warehouse because it supports schema evolution, compression, and predicate pushdown?

  1. Parquet Correct answer.
  2. PCAP
  3. BMP
  4. Plain-text TSV

Explanation

Parquet is a columnar format that stores schema metadata, compresses well per column, and enables predicate pushdown, making it well suited to Impala and Spark analytics. The other formats are either row-oriented text or unrelated binary formats.

Question 44Data Access, Ingestion, and Preparation

An engineer needs to register an existing directory of Parquet files in object storage as a queryable table in Impala. Which statement accomplishes this?

  1. INSERT INTO ... SELECT * FROM ...
  2. DROP TABLE IF EXISTS ... PURGE
  3. CREATE TABLE ... STORED AS PARQUET LOCATION 's3a://bucket/path' Correct answer.
  4. COMPUTE STATS ...

Explanation

A CREATE TABLE statement with STORED AS PARQUET and a LOCATION clause points Impala at existing files and makes them queryable as a table. INSERT, DROP, and COMPUTE STATS modify or analyze existing tables rather than register external files.

Question 45Data Access, Ingestion, and Preparation

What is the main purpose of running COMPUTE STATS on a table in Impala before heavy analytical queries?

  1. To enforce primary key constraints on the table
  2. To compress the underlying files automatically
  3. To replicate the table to a second cluster
  4. To gather column and table statistics that improve query planning Correct answer.

Explanation

COMPUTE STATS collects table and column statistics such as row counts and distinct values, which the query planner uses to choose better join orders and strategies. It does not compress files, enforce constraints, or replicate data.

Question 46Data Access, Ingestion, and Preparation

Which mechanism allows a CML session to authenticate to an external HDFS or S3 data source without embedding long-lived credentials in code?

  1. Storing keys in a public README
  2. Using a project-level or platform-managed credential and connection configuration Correct answer.
  3. Hard-coding access keys in the notebook
  4. Publishing keys in the Git commit message

Explanation

CML supports managed credentials and connection configurations that the runtime injects, so code does not need embedded secrets. Hard-coding or publishing keys exposes them and violates security practice.

Question 47Data Access, Ingestion, and Preparation

A data scientist wants to convert a Spark DataFrame to a pandas DataFrame for a small aggregated result in a CML session. Which method is appropriate?

  1. df.collectAsList()
  2. df.rdd.saveAsTextFile()
  3. df.write.mode('append').save()
  4. df.toPandas() Correct answer.

Explanation

toPandas() collects a Spark DataFrame into a pandas DataFrame in the driver, which is appropriate only for small results that fit in driver memory. The other methods return lists, write text files, or persist data rather than producing a pandas object.

Question 48Data Access, Ingestion, and Preparation

Which statement best describes the role of a Hive metastore in the Cloudera data platform?

  1. It stores the actual data blocks of every table
  2. It schedules recurring ingestion jobs
  3. It maintains table and partition metadata that engines like Impala and Spark use to locate data Correct answer.
  4. It provides the web UI for notebooks

Explanation

The Hive metastore is a metadata service that records table definitions, schemas, and partition locations so engines such as Impala and Spark can resolve and query data. It does not store the data blocks themselves, schedule jobs, or serve notebooks.

Question 49Data Access, Ingestion, and Preparation

A pipeline reads JSON event files where each record contains nested arrays. Which Spark approach most directly flattens the nested arrays into individual rows?

  1. Use repartition(1) on the DataFrame
  2. Use coalesce(100) on the DataFrame
  3. Use explode() on the array column Correct answer.
  4. Use cache() on the DataFrame

Explanation

The explode() function takes an array column and produces one row per element, which flattens nested arrays into rows. Repartition, cache, and coalesce change partitioning or persistence and do not flatten data.

Question 50Data Access, Ingestion, and Preparation

An engineer ingests a CSV with a header row and wants Spark to infer column types. Which reader option combination is most appropriate?

  1. header=True and inferSchema=True Correct answer.
  2. sep='|' and quote=''
  3. mode='DROPMALFORMED' only
  4. recursiveFileLookup=True only

Explanation

Setting header=True uses the first line as column names and inferSchema=True lets Spark sample the data to determine types. The other options control delimiters, malformed-record handling, or directory traversal but do not handle headers and type inference.