CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice question 7 of 25
A developer wants to test Spark Connect with an existing Spark application. What are the two alternative ways the developer can start a local Spark…
Choose your answer, then check it against the explanation and the full breakdown below.
Question breakdown
Key idea: A Spark Connect client can be pointed at a server from outside the code, either with the --remote launch option or with the SPARK_REMOTE environment variable, using the sc:// scheme.
How to reach the answer
- The constraint is 'without changing their existing application code', which rules out any edit to the builder.
- Spark Connect URIs use the sc:// scheme, not https://.
- The pyspark --remote "sc://localhost" flag sets Connect mode at launch.
- Exporting SPARK_REMOTE="sc://localhost" makes the default SparkSession connect remotely without any code change.
Each option
Common trap: Option D is a valid way to use Spark Connect, so it is tempting, but it breaks the explicit no-code-change constraint.
In practice: Teams often move existing PySpark scripts to Spark Connect by setting SPARK_REMOTE in the environment or CI config, so the same code runs locally or against a remote server.
Remember: For Spark Connect without code changes, use --remote sc://... or SPARK_REMOTE=sc://...
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice questions
- Question 1You have: DataFrame A: 128 GB of transactions DataFrame B: 1 GB user lookup table Which s…
- Question 2A Spark DataFrame df is cached using the MEMORY_AND_DISK storage level, but the DataFrame…
- Question 344 of 55. A data engineer is working on a real-time analytics pipeline using Spark Struct…
- Question 8A data engineer is running a Spark job to process a dataset of 1 TB stored in distributed…
- Question 10A data engineer is building a Structured Streaming pipeline and wants the pipeline to rec…
- Question 11Given a DataFrame df that has 10 partitions, after running the code: result = df.coalesce…
