DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Practice Questions
181 real DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam questions with expert-verified answers and explanations. Page 4 of 4.
- Question #151Performance Tuning
Which of the following cluster configurations is least likely to experience delays due to garbage collection of a large DataFrame? Note: each configuration has roughly the same com...
Spark Cluster ConfigurationGarbage CollectionMemory ManagementPerformance Tuning - Question #152Spark DataFrame Transformations
The code block shown below should return a new DataFrame where column product補tegories only has one word per row, resulting in a DataFrame with many more rows than DataFrame stores...
Spark DataFrame APIDataFrame Transformationsexplode functionColumn Operations - Question #153Working with Spark DataFrames
Which of the following code blocks returns a new DataFrame with column storeReview where the pattern "End" has been removed from the end of column storeReview in DataFrame storesDF...
Spark DataFramesColumn FunctionsRegular ExpressionsString Manipulation - Question #154Data Transformation and Manipulation
The code block shown below should return a new DataFrame where rows in DataFrame storesDF containing at least one missing value have been dropped. Choose the response that correctl...
Spark DataFramesMissing DataData CleaningPySpark - Question #155Performing Data Aggregations with Spark DataFrames and SQL
Which of the following operations calculates the simple average of a group of values, like a column?
Spark DataFramesAggregate FunctionsStatistical OperationsPySpark - Question #156Spark SQL and DataFrames
Which of the following code blocks fails to return the number of rows in DataFrame storesDF for each distinct combination of values in column division and column storeCategory?
PySpark DataFramesgroupByAggregationsDataFrame Transformations - Question #157Working with DataFrames
The code block shown below contains an error. The code block is intended to return a collection of summary statistics for column sqft in Data Frame storesDF. Identify the error. Co...
PySpark DataFrame APIDataFrame TransformationsSummary StatisticsColumn References - Question #158Perform DataFrame API Operations (Transformations)
The code block shown below should return a 25 percent sample of rows from DataFrame storesDF with reproducible results. Choose the response that correctly fills in the numbered bla...
Spark DataFramesData SamplingReproducibilityPySpark - Question #159Implementing User-Defined Functions (UDFs) in PySpark
Which of the following code blocks creates a Python UDF assessPerformanceUDF() using the integer-returning Python function assessPerformance() and applies it to Column customerSati...
PySpark UDFsDataFrame TransformationsSpark SQL Data TypesPython for Spark - Question #160PySpark DataFrame Operations
The code block shown below contains an error. The code block is intended to create a single- column DataFrame from Python list years which is made up of integers. Identify the erro...
PySpark DataFrame APISchema InferencecreateDataFrameData Type Handling - Question #161Data Transformation and Manipulation
The code block shown below should return a DataFrame containing a column openDateString, a string representation of Java's SimpleDateFormat. Choose the response that correctly fill...
Spark DataFramesDate Time OperationsSpark SQL FunctionsData Type Conversion - Question #162Perform data manipulation and transformations using Spark DataFrames
Which of the following operations can be used to perform a left join on two DataFrames?
DataFrame operationsJoinsData TransformationSpark SQL - Question #163Transforming Data with Spark DataFrames
The code block shown below should return a new DataFrame that is the result of an inner join between DataFrame storesDF and DataFrame employeesDF on column storeId and column emplo...
Spark DataFramesJoinsDataFrame APIColumn Expressions - Question #164Working with Spark DataFrames
The code block shown below should return a new DataFrame that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF. Choose the response...
Spark DataFrame APIDataFrame TransformationsUnion OperationData Manipulation - Question #165Performing Data Input/Output (I/O) with Spark DataFrames
Which of the following code blocks writes DataFrame storesDF to file path filePath as text files overwriting any existing files in that location?
DataFrame OperationsWriting DataSpark APIText Format - Question #166Reading and Writing Data with Spark DataFrames
The code block shown below contains an error. The code block is intended to read JSON at the file path filePath into a DataFrame with the specified schema schema. Identify the erro...
PySpark DataFrameData IngestionSchema DefinitionDataFrameReader - Question #167Spark Architecture
Which of the following describes executors?
Spark ArchitectureSpark ExecutorsSpark Execution ModelCore Spark Concepts - Question #168Perform DataFrame Transformations
The code block shown below should return a DataFrame containing only the rows from DataFrame storesDF where the value in column sqft is less than or equal to 25,000 AND the value i...
Spark DataFramesDataFrame FilteringConditional LogicColumn Operations - Question #169Working with DataFrames
Which of the following code blocks returns a DataFrame with column storeSlogan where single quotes in column storeSlogan in DataFrame storesDF have been replaced with double quotes...
DataFrame TransformationsSpark SQL FunctionsString Manipulation - Question #170Spark DataFrame Operations
Which of the following operations can be used to rename and replace an existing column in a DataFrame?
Spark DataFrameColumn OperationsData Transformation - Question #171Working with Spark DataFrames
The code block shown below should print the schema of DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this tas...
Spark DataFrameSchemaAPI UsageData Inspection - Question #172Spark SQL and DataFrames
The code block shown below contains an error. The code block is intended to create and register a SQL UDF named "ASSESS_PERFORMANCE" using the Python function assessPerformance() a...
UDF RegistrationSpark SQLPython UDFsError Identification - Question #173Spark Data Persistence
Which of the following code blocks attempts to cache the partitions of DataFrame storesDF only in Spark's memory?
Spark CachingSpark PersistenceStorageLevelDataFrame Optimization - Question #174Spark DataFrame Operations and Data Distribution
Which of the following operations will always return a new DataFrame with updated partitions from DataFrame storesDF by inducing a shuffle?
DataFrame TransformationsData PartitioningShuffle OperationsPerformance Implications - Question #175Transforming and manipulating data within Spark DataFrames, specifically handling date and time data types by converting UNIX epoch to a timestamp.
Which of the following code blocks returns a DataFrame containing a column month, an integer representation of the month from column openDate from DataFrame storesDF? Note that col...
Spark DataFramesDate/Time FunctionsType CastingUNIX Epoch - Question #176Data Ingestion and Transformations
The code block shown below should read a parquet at the file path filePath into a DataFrame. Choose the response that correctly fills in the numbered blanks within the code block t...
Spark DataFramesData IngestionParquet FormatSparkSession - Question #177Spark Execution Model
Which of the following statements describing a difference between transformations and actions is incorrect?
Spark TransformationsSpark ActionsLazy EvaluationSpark Core Concepts - Question #178Performance Tuning and Optimization
Which of the following describes why garbage collection in Spark is important?
Garbage CollectionMemory ManagementSpark PerformanceResource Management - Question #179Transforming Data with Spark DataFrames
Which of the following code blocks returns a new DataFrame where column managerNameLength is the number of characters in column managerName in DataFrame storesDF? Assume DataFrame...
Spark DataFramesColumn TransformationsString FunctionswithColumn - Question #180Data Preparation and Transformation
Which of the following code blocks returns a DataFrame where rows in DataFrame storesDF containing missing values in every column have been dropped?
Spark DataFramesMissing Valuesna.dropData Cleaning - Question #181Transforming Data with Spark DataFrames
The code block shown below contains an error. The code block is intended to return a new DataFrame that is the result of a left join between DataFrame storesDF and DataFrame employ...
Spark DataFramesDataFrame JoinsJoin TypesPySpark API