Certified Associate Developer for Apache Spark Practice Test 38
Question 370
At Pinecrest Media, after a routine data refresh (fictional study case R280-C074-1), a team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Add checkpoint storage only for the streaming query.
- Change SQL name qualification without claiming persistence across applications.
- Correct SQL qualification in the affected session.
- Re-register the designated view without modifying its source files.
Explanation
Correct Answer
B:Keep the intervention within this boundary: Change SQL name qualification without claiming persistence across applications. The reported failure mechanism is: Global temporary views reside in the `global_temp` database and require a qualified name.
Incorrect Answers
A:Add checkpoint storage only for the streaming query. This does not enforce the required scope: Change SQL name qualification without claiming persistence across applications. The specific failure is: Global temporary views reside in the `global_temp` database and require a qualified name.
C:Correct SQL qualification in the affected session. This does not enforce the required scope: Change SQL name qualification without claiming persistence across applications. The specific failure is: Global temporary views reside in the `global_temp` database and require a qualified name.
D:Re-register the designated view without modifying its source files. It is not the bounded choice for the stated condition: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The permitted change must remain: Change SQL name qualification without claiming persistence across applications.
Question 371
At Ironlake Networks, when reviewing an incremental load (fictional study case R280-C075-1), a stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. Which corrective Spark operation or design change BEST addresses the reported failure? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Configure a supported stream checkpoint location and manage view lifecycle separately.
- Qualify the desired persistent table and avoid ambiguous temp view names.
- Replace the temp view using the transformed DataFrame before querying it.
- Register a projected DataFrame with only necessary safe fields or aggregate results.
Explanation
Correct Answer
A:A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The underlying cause is: View registration is a query namespace feature, not a durable streaming state checkpoint. The corrective step is: Configure a supported stream checkpoint location and manage view lifecycle separately. Validate the outcome: Processing resumes from recovered offsets/state while view recreation follows session rules.
Incorrect Answers
B:Qualify the desired persistent table and avoid ambiguous temp view names. That would not resolve the reported problem: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The source-supported intervention is: Configure a supported stream checkpoint location and manage view lifecycle separately.
C:Replace the temp view using the transformed DataFrame before querying it. The recorded mechanism is: View registration is a query namespace feature, not a durable streaming state checkpoint. The proposed action does not correct that mechanism; use: Configure a supported stream checkpoint location and manage view lifecycle separately.
D:Register a projected DataFrame with only necessary safe fields or aggregate results. That would not resolve the reported problem: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The source-supported intervention is: Configure a supported stream checkpoint location and manage view lifecycle separately.
Question 372
At Valleywide Travel, before a production rollout (fictional study case R280-C075-2), a stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The engineer wants to distinguish the mechanism before changing code. Which underlying Spark mechanism BEST explains the observed symptom? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Unqualified SQL relation resolution can prioritize a session temp view of the same name.
- View registration is a query namespace feature, not a durable streaming state checkpoint.
- Reassigning a DataFrame variable does not change a previously registered view plan.
- View registration exposes all supplied DataFrame columns to users allowed to query that session context.
Explanation
Correct Answer
B:The failure is explained by: View registration is a query namespace feature, not a durable streaming state checkpoint. A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. Correcting it would require: Configure a supported stream checkpoint location and manage view lifecycle separately.
Incorrect Answers
A:Unqualified SQL relation resolution can prioritize a session temp view of the same name. The observed failure instead follows from: View registration is a query namespace feature, not a durable streaming state checkpoint. The alternative does not explain the same dependency.
C:Reassigning a DataFrame variable does not change a previously registered view plan. This is not the root cause established for the reported condition: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The cause is: View registration is a query namespace feature, not a durable streaming state checkpoint.
D:View registration exposes all supplied DataFrame columns to users allowed to query that session context. The observed failure instead follows from: View registration is a query namespace feature, not a durable streaming state checkpoint. The alternative does not explain the same dependency.
Question 373
At Harbor Data Labs, while optimizing an ETL application (fictional study case R280-C075-1), a stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. Competing explanations are being considered; choose the most discriminating check. Which evidence check BEST distinguishes this cause from a different Spark problem? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Restart a test stream and compare state recovery with and without checkpoint configuration.
- Inspect session views and compare `orders` with fully qualified catalog name.
- Compare registered view schema with new variable schema.
- Inspect view schema against approved consumer column list.
Explanation
Correct Answer
A:A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The useful diagnostic is: Restart a test stream and compare state recovery with and without checkpoint configuration. That can confirm or refute: View registration is a query namespace feature, not a durable streaming state checkpoint.
Incorrect Answers
B:Inspect session views and compare `orders` with fully qualified catalog name. The case requires a discriminating check before any change, not the offered alternative. Use: Restart a test stream and compare state recovery with and without checkpoint configuration.
C:Compare registered view schema with new variable schema. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Restart a test stream and compare state recovery with and without checkpoint configuration.
D:Inspect view schema against approved consumer column list. That does not establish whether the stated cause is present: View registration is a query namespace feature, not a durable streaming state checkpoint. The diagnostic is: Restart a test stream and compare state recovery with and without checkpoint configuration.
Question 374
At Oakline Transportation, during an internal acceptance test (fictional study case R280-C075-2), a stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. A proposed fix has been applied; its result still needs validation. Which measurable outcome BEST confirms the fix works without violating the data contract? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Production SQL returns persistent-table rows, not test data.
- Processing resumes from recovered offsets/state while view recreation follows session rules.
- The SQL view exposes the intended transformed columns.
- Queries expose only permitted columns and correct aggregate measures.
Explanation
Correct Answer
B:A passing check shows: Processing resumes from recovered offsets/state while view recreation follows session rules. This is evidence for the scoped change: Configure a supported stream checkpoint location and manage view lifecycle separately.
Incorrect Answers
A:Production SQL returns persistent-table rows, not test data. The alternative cannot demonstrate that the issue has been corrected: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The required result is: Processing resumes from recovered offsets/state while view recreation follows session rules.
C:The SQL view exposes the intended transformed columns. Implementation or a check alone is not proof of success. The measurable end state is: Processing resumes from recovered offsets/state while view recreation follows session rules.
D:Queries expose only permitted columns and correct aggregate measures. This is not the observed recovery outcome. Acceptance requires: Processing resumes from recovered offsets/state while view recreation follows session rules.
Question 375
At Rosehill Diagnostics, after a routine data refresh (fictional study case R280-C075-1), a stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Correct SQL qualification in the affected session.
- Re-register the designated view without modifying its source files.
- Add checkpoint storage only for the streaming query.
- Limit the temp view's projection, not global source permissions.
Explanation
Correct Answer
C:Keep scope tied to the actual issue: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The bounded intervention is: Add checkpoint storage only for the streaming query. Confirm: Processing resumes from recovered offsets/state while view recreation follows session rules.
Incorrect Answers
A:Correct SQL qualification in the affected session. This does not enforce the required scope: Add checkpoint storage only for the streaming query. The specific failure is: View registration is a query namespace feature, not a durable streaming state checkpoint.
B:Re-register the designated view without modifying its source files. The action does not preserve the identified scope boundary: Add checkpoint storage only for the streaming query.
D:Limit the temp view's projection, not global source permissions. It is not the bounded choice for the stated condition: A stream pipeline registers a temporary view and assumes it can recover state after restarting the Spark application. The permitted change must remain: Add checkpoint storage only for the streaming query.
Question 376
At Redwood Transit, when reviewing an incremental load (fictional study case R280-C076-1), a session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. Which corrective Spark operation or design change BEST addresses the reported failure? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Qualify the desired persistent table and avoid ambiguous temp view names.
- Replace the temp view using the transformed DataFrame before querying it.
- Register a projected DataFrame with only necessary safe fields or aggregate results.
- Use a simple valid view name or quote the intended identifier according to Spark SQL rules.
Explanation
Correct Answer
A:A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The underlying cause is: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The corrective step is: Qualify the desired persistent table and avoid ambiguous temp view names. Validate the outcome: Production SQL returns persistent-table rows, not test data.
Incorrect Answers
B:Replace the temp view using the transformed DataFrame before querying it. The option targets a different stage or condition. The relevant failure is: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The needed repair is: Qualify the desired persistent table and avoid ambiguous temp view names.
C:Register a projected DataFrame with only necessary safe fields or aggregate results. The option targets a different stage or condition. The relevant failure is: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The needed repair is: Qualify the desired persistent table and avoid ambiguous temp view names.
D:Use a simple valid view name or quote the intended identifier according to Spark SQL rules. That would not resolve the reported problem: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The source-supported intervention is: Qualify the desired persistent table and avoid ambiguous temp view names.
Question 377
At Meadowvale Robotics, before a production rollout (fictional study case R280-C076-2), a session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The engineer wants to distinguish the mechanism before changing code. Which underlying Spark mechanism BEST explains the observed symptom? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Unqualified SQL relation resolution can prioritize a session temp view of the same name.
- Reassigning a DataFrame variable does not change a previously registered view plan.
- View registration exposes all supplied DataFrame columns to users allowed to query that session context.
- The SQL parser interprets the name as multiple tokens without identifier quoting.
Explanation
Correct Answer
A:Unqualified SQL relation resolution can prioritize a session temp view of the same name. This accounts for the observed condition: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The relevant verification is: Inspect session views and compare `orders` with fully qualified catalog name.
Incorrect Answers
B:Reassigning a DataFrame variable does not change a previously registered view plan. This is not the root cause established for the reported condition: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The cause is: Unqualified SQL relation resolution can prioritize a session temp view of the same name.
C:View registration exposes all supplied DataFrame columns to users allowed to query that session context. That explanation needs evidence of another fault. The specific mechanism here is: Unqualified SQL relation resolution can prioritize a session temp view of the same name.
D:The SQL parser interprets the name as multiple tokens without identifier quoting. The observed failure instead follows from: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The alternative does not explain the same dependency.
Question 378
At Northridge Retail, while optimizing an ETL application (fictional study case R280-C076-1), a session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. Competing explanations are being considered; choose the most discriminating check. Which evidence check BEST distinguishes this cause from a different Spark problem? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Inspect session views and compare `orders` with fully qualified catalog name.
- Compare registered view schema with new variable schema.
- Inspect view schema against approved consumer column list.
- Test resolution of the registered name with proper quoting.
Explanation
Correct Answer
A:Inspect session views and compare `orders` with fully qualified catalog name. This gathers evidence about the stated mechanism: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The existing symptom is: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table.
Incorrect Answers
B:Compare registered view schema with new variable schema. That does not establish whether the stated cause is present: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The diagnostic is: Inspect session views and compare `orders` with fully qualified catalog name.
C:Inspect view schema against approved consumer column list. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect session views and compare `orders` with fully qualified catalog name.
D:Test resolution of the registered name with proper quoting. That does not establish whether the stated cause is present: Unqualified SQL relation resolution can prioritize a session temp view of the same name. The diagnostic is: Inspect session views and compare `orders` with fully qualified catalog name.
Question 379
At Northstar Payments, during an internal acceptance test (fictional study case R280-C076-2), a session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. A proposed fix has been applied; its result still needs validation. Which measurable outcome BEST confirms the fix works without violating the data contract? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- The SQL view exposes the intended transformed columns.
- Queries expose only permitted columns and correct aggregate measures.
- Production SQL returns persistent-table rows, not test data.
- Queries resolve to the intended view without syntax errors.
Explanation
Correct Answer
C:Production SQL returns persistent-table rows, not test data. This demonstrates the intended effect of: Qualify the desired persistent table and avoid ambiguous temp view names. The prior failure was: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table.
Incorrect Answers
A:The SQL view exposes the intended transformed columns. This is not the observed recovery outcome. Acceptance requires: Production SQL returns persistent-table rows, not test data.
B:Queries expose only permitted columns and correct aggregate measures. This is not the observed recovery outcome. Acceptance requires: Production SQL returns persistent-table rows, not test data.
D:Queries resolve to the intended view without syntax errors. The alternative cannot demonstrate that the issue has been corrected: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The required result is: Production SQL returns persistent-table rows, not test data.
Question 380
At Cloudhaven Apps, after a routine data refresh (fictional study case R280-C076-1), a session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Re-register the designated view without modifying its source files.
- Limit the temp view's projection, not global source permissions.
- Correct SQL qualification in the affected session.
- Rename or quote only the affected temporary relation.
Explanation
Correct Answer
C:Keep the intervention within this boundary: Correct SQL qualification in the affected session. The reported failure mechanism is: Unqualified SQL relation resolution can prioritize a session temp view of the same name.
Incorrect Answers
A:Re-register the designated view without modifying its source files. It is not the bounded choice for the stated condition: A session creates a temporary view named `orders`, and SQL reads test rows instead of the persistent `sales.orders` table. The permitted change must remain: Correct SQL qualification in the affected session.
B:Limit the temp view's projection, not global source permissions. This does not enforce the required scope: Correct SQL qualification in the affected session. The specific failure is: Unqualified SQL relation resolution can prioritize a session temp view of the same name.
D:Rename or quote only the affected temporary relation. The action does not preserve the identified scope boundary: Correct SQL qualification in the affected session.