Certified Associate Developer for Apache Spark Practice Test 37
Question 360
At Mapleford Engineering, after a routine data refresh (fictional study case R280-C072-1), a notebook rerun fails when attempting to register an already existing temporary view with `createTempView`. 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.
- Register only the needed relation in the current session.
- Replace only the designated temporary view.
- Change SQL name qualification without claiming persistence across applications.
- Add checkpoint storage only for the streaming query.
Explanation
Correct Answer
B:Keep the intervention within this boundary: Replace only the designated temporary view. The reported failure mechanism is: The registration method rejects duplicate names, unlike `createOrReplaceTempView`.
Incorrect Answers
A:Register only the needed relation in the current session. This does not enforce the required scope: Replace only the designated temporary view. The specific failure is: The registration method rejects duplicate names, unlike `createOrReplaceTempView`.
C:Change SQL name qualification without claiming persistence across applications. It is not the bounded choice for the stated condition: A notebook rerun fails when attempting to register an already existing temporary view with `createTempView`. The permitted change must remain: Replace only the designated temporary view.
D:Add checkpoint storage only for the streaming query. This does not enforce the required scope: Replace only the designated temporary view. The specific failure is: The registration method rejects duplicate names, unlike `createOrReplaceTempView`.
Question 361
At Horizon Logistics, when reviewing an incremental load (fictional study case R280-C073-1), a query references the Python DataFrame variable `df` as a SQL table but no relation was registered. 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.
- Query `global_temp.view_name` from sessions in the same Spark application where the view exists.
- Configure a supported stream checkpoint location and manage view lifecycle separately.
- Call `df.createOrReplaceTempView('events')` and query the registered relation name.
- Qualify the desired persistent table and avoid ambiguous temp view names.
Explanation
Correct Answer
C:The failure mechanism is: Python variable names are not automatically Spark SQL catalog identifiers. Apply the bounded change: Call `df.createOrReplaceTempView('events')` and query the registered relation name. The acceptance test must show: SQL can query the intended DataFrame by the declared view name.
Incorrect Answers
A:Query `global_temp.view_name` from sessions in the same Spark application where the view exists. The recorded mechanism is: Python variable names are not automatically Spark SQL catalog identifiers. The proposed action does not correct that mechanism; use: Call `df.createOrReplaceTempView('events')` and query the registered relation name.
B:Configure a supported stream checkpoint location and manage view lifecycle separately. The option targets a different stage or condition. The relevant failure is: Python variable names are not automatically Spark SQL catalog identifiers. The needed repair is: Call `df.createOrReplaceTempView('events')` and query the registered relation name.
D:Qualify the desired persistent table and avoid ambiguous temp view names. The option targets a different stage or condition. The relevant failure is: Python variable names are not automatically Spark SQL catalog identifiers. The needed repair is: Call `df.createOrReplaceTempView('events')` and query the registered relation name.
Question 362
At Aspen Public Services, before a production rollout (fictional study case R280-C073-2), a query references the Python DataFrame variable `df` as a SQL table but no relation was registered. 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.
- Global temporary views reside in the `global_temp` database and require a qualified name.
- View registration is a query namespace feature, not a durable streaming state checkpoint.
- Python variable names are not automatically Spark SQL catalog identifiers.
- Unqualified SQL relation resolution can prioritize a session temp view of the same name.
Explanation
Correct Answer
C:Investigation should distinguish this specific mechanism: Python variable names are not automatically Spark SQL catalog identifiers. The related symptom is: A query references the Python DataFrame variable `df` as a SQL table but no relation was registered. The discriminating check is: Inspect Spark SQL catalog and reproduce the missing-table error before registration.
Incorrect Answers
A:Global temporary views reside in the `global_temp` database and require a qualified name. The observed failure instead follows from: Python variable names are not automatically Spark SQL catalog identifiers. The alternative does not explain the same dependency.
B:View registration is a query namespace feature, not a durable streaming state checkpoint. This is not the root cause established for the reported condition: A query references the Python DataFrame variable `df` as a SQL table but no relation was registered. The cause is: Python variable names are not automatically Spark SQL catalog identifiers.
D:Unqualified SQL relation resolution can prioritize a session temp view of the same name. This is not the root cause established for the reported condition: A query references the Python DataFrame variable `df` as a SQL table but no relation was registered. The cause is: Python variable names are not automatically Spark SQL catalog identifiers.
Question 363
At Juniper Foods, while optimizing an ETL application (fictional study case R280-C073-1), a query references the Python DataFrame variable `df` as a SQL table but no relation was registered. 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 `global_temp` catalog entries and both qualified and unqualified queries.
- Restart a test stream and compare state recovery with and without checkpoint configuration.
- Inspect Spark SQL catalog and reproduce the missing-table error before registration.
- Inspect session views and compare `orders` with fully qualified catalog name.
Explanation
Correct Answer
C:Diagnose the affected path with: Inspect Spark SQL catalog and reproduce the missing-table error before registration. This tests the case-specific cause: Python variable names are not automatically Spark SQL catalog identifiers.
Incorrect Answers
A:Inspect `global_temp` catalog entries and both qualified and unqualified queries. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect Spark SQL catalog and reproduce the missing-table error before registration.
B:Restart a test stream and compare state recovery with and without checkpoint configuration. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect Spark SQL catalog and reproduce the missing-table error before registration.
D: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: Inspect Spark SQL catalog and reproduce the missing-table error before registration.
Question 364
At Silverpeak Bioinformatics, during an internal acceptance test (fictional study case R280-C073-2), a query references the Python DataFrame variable `df` as a SQL table but no relation was registered. 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 shared global temp view resolves correctly while still remaining application-scoped.
- Processing resumes from recovered offsets/state while view recreation follows session rules.
- Production SQL returns persistent-table rows, not test data.
- SQL can query the intended DataFrame by the declared view name.
Explanation
Correct Answer
D:SQL can query the intended DataFrame by the declared view name. This demonstrates the intended effect of: Call `df.createOrReplaceTempView('events')` and query the registered relation name. The prior failure was: A query references the Python DataFrame variable `df` as a SQL table but no relation was registered.
Incorrect Answers
A:The shared global temp view resolves correctly while still remaining application-scoped. This is not the observed recovery outcome. Acceptance requires: SQL can query the intended DataFrame by the declared view name.
B:Processing resumes from recovered offsets/state while view recreation follows session rules. This is not the observed recovery outcome. Acceptance requires: SQL can query the intended DataFrame by the declared view name.
C:Production SQL returns persistent-table rows, not test data. Implementation or a check alone is not proof of success. The measurable end state is: SQL can query the intended DataFrame by the declared view name.
Question 365
At Willowbank Software, after a routine data refresh (fictional study case R280-C073-1), a query references the Python DataFrame variable `df` as a SQL table but no relation was registered. 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.
- Register only the needed relation in the current session.
- Change SQL name qualification without claiming persistence across applications.
- Add checkpoint storage only for the streaming query.
- Correct SQL qualification in the affected session.
Explanation
Correct Answer
A:Keep scope tied to the actual issue: A query references the Python DataFrame variable `df` as a SQL table but no relation was registered. The bounded intervention is: Register only the needed relation in the current session. Confirm: SQL can query the intended DataFrame by the declared view name.
Incorrect Answers
B:Change SQL name qualification without claiming persistence across applications. The action does not preserve the identified scope boundary: Register only the needed relation in the current session.
C:Add checkpoint storage only for the streaming query. This does not enforce the required scope: Register only the needed relation in the current session. The specific failure is: Python variable names are not automatically Spark SQL catalog identifiers.
D:Correct SQL qualification in the affected session. The action does not preserve the identified scope boundary: Register only the needed relation in the current session.
Question 366
At Seabrook Education, when reviewing an incremental load (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. 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.
- Query `global_temp.view_name` from sessions in the same Spark application where the view exists.
- 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.
Explanation
Correct Answer
A:A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The underlying cause is: Global temporary views reside in the `global_temp` database and require a qualified name. The corrective step is: Query `global_temp.view_name` from sessions in the same Spark application where the view exists. Validate the outcome: The shared global temp view resolves correctly while still remaining application-scoped.
Incorrect Answers
B:Configure a supported stream checkpoint location and manage view lifecycle separately. That would not resolve the reported problem: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The source-supported intervention is: Query `global_temp.view_name` from sessions in the same Spark application where the view exists.
C:Qualify the desired persistent table and avoid ambiguous temp view names. That would not resolve the reported problem: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The source-supported intervention is: Query `global_temp.view_name` from sessions in the same Spark application where the view exists.
D:Replace the temp view using the transformed DataFrame before querying it. That would not resolve the reported problem: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The source-supported intervention is: Query `global_temp.view_name` from sessions in the same Spark application where the view exists.
Question 367
At Bluewater Energy, before a production rollout (fictional study case R280-C074-2), a team creates a global temporary view but queries its name unqualified in a new session, receiving not found. 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.
- View registration is a query namespace feature, not a durable streaming state checkpoint.
- 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.
- Global temporary views reside in the `global_temp` database and require a qualified name.
Explanation
Correct Answer
D:Investigation should distinguish this specific mechanism: Global temporary views reside in the `global_temp` database and require a qualified name. The related symptom is: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The discriminating check is: Inspect `global_temp` catalog entries and both qualified and unqualified queries.
Incorrect Answers
A:View registration is a query namespace feature, not a durable streaming state checkpoint. That explanation needs evidence of another fault. The specific mechanism here is: Global temporary views reside in the `global_temp` database and require a qualified name.
B:Unqualified SQL relation resolution can prioritize a session temp view of the same name. That explanation needs evidence of another fault. The specific mechanism here is: Global temporary views reside in the `global_temp` database and require a qualified name.
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 team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The cause is: Global temporary views reside in the `global_temp` database and require a qualified name.
Question 368
At Meridian Commerce, while optimizing an ETL application (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. 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 `global_temp` catalog entries and both qualified and unqualified queries.
- 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.
Explanation
Correct Answer
A:Use this focused test: Inspect `global_temp` catalog entries and both qualified and unqualified queries. The test distinguishes the reported condition from alternatives by checking: Global temporary views reside in the `global_temp` database and require a qualified name.
Incorrect Answers
B:Restart a test stream and compare state recovery with and without checkpoint configuration. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect `global_temp` catalog entries and both qualified and unqualified queries.
C: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: Inspect `global_temp` catalog entries and both qualified and unqualified queries.
D:Compare registered view schema with new variable schema. That does not establish whether the stated cause is present: Global temporary views reside in the `global_temp` database and require a qualified name. The diagnostic is: Inspect `global_temp` catalog entries and both qualified and unqualified queries.
Question 369
At Copperline Finance, during an internal acceptance test (fictional study case R280-C074-2), a team creates a global temporary view but queries its name unqualified in a new session, receiving not found. 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.
- Processing resumes from recovered offsets/state while view recreation follows session rules.
- The shared global temp view resolves correctly while still remaining application-scoped.
- Production SQL returns persistent-table rows, not test data.
- The SQL view exposes the intended transformed columns.
Explanation
Correct Answer
B:Acceptance requires: The shared global temp view resolves correctly while still remaining application-scoped. That directly tests whether the mechanism was corrected: Global temporary views reside in the `global_temp` database and require a qualified name.
Incorrect Answers
A:Processing resumes from recovered offsets/state while view recreation follows session rules. The alternative cannot demonstrate that the issue has been corrected: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The required result is: The shared global temp view resolves correctly while still remaining application-scoped.
C:Production SQL returns persistent-table rows, not test data. The alternative cannot demonstrate that the issue has been corrected: A team creates a global temporary view but queries its name unqualified in a new session, receiving not found. The required result is: The shared global temp view resolves correctly while still remaining application-scoped.
D:The SQL view exposes the intended transformed columns. This is not the observed recovery outcome. Acceptance requires: The shared global temp view resolves correctly while still remaining application-scoped.
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.