Certified Associate Developer for Apache Spark Practice Test 54
Question 530
At Harbor Data Labs, during a performance incident (fictional study case R280-C106-1), two DataFrames have the same column names in different order; position-based `union` mixes revenue with quantity. 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.
- Address the duplicate-key source without dropping legitimate facts.
- Change join strategy only for the oversized dimension.
- Correct this join relation only.
- Fix only the two-feed combination.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: Two DataFrames have the same column names in different order; position-based `union` mixes revenue with quantity. The bounded intervention is: Fix only the two-feed combination. Confirm: Values align under the intended field names.
Incorrect Answers
A:Address the duplicate-key source without dropping legitimate facts. The action does not preserve the identified scope boundary: Fix only the two-feed combination.
B:Change join strategy only for the oversized dimension. This does not enforce the required scope: Fix only the two-feed combination. The specific failure is: `union` aligns columns by position rather than automatically by name.
C:Correct this join relation only. This does not enforce the required scope: Fix only the two-feed combination. The specific failure is: `union` aligns columns by position rather than automatically by name.
Question 531
At Oakline Transportation, while optimizing an ETL application (fictional study case R280-C107-1), a customer join produces 20 times as many records because both datasets have duplicate customer IDs. 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.
- Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
- Use an equijoin on the required business keys and validate expected cardinality.
- Validate cardinality and deduplicate or aggregate the appropriate side before joining.
- Join on both `order_id` and `line_no` with type-consistent keys.
Explanation
Correct Answer
C:The failure mechanism is: Duplicate join keys cause Cartesian multiplication within each matching key group. Apply the bounded change: Validate cardinality and deduplicate or aggregate the appropriate side before joining. The acceptance test must show: Output matches the agreed relationship cardinality.
Incorrect Answers
A:Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters. That would not resolve the reported problem: A customer join produces 20 times as many records because both datasets have duplicate customer IDs. The source-supported intervention is: Validate cardinality and deduplicate or aggregate the appropriate side before joining.
B:Use an equijoin on the required business keys and validate expected cardinality. That would not resolve the reported problem: A customer join produces 20 times as many records because both datasets have duplicate customer IDs. The source-supported intervention is: Validate cardinality and deduplicate or aggregate the appropriate side before joining.
D:Join on both `order_id` and `line_no` with type-consistent keys. The recorded mechanism is: Duplicate join keys cause Cartesian multiplication within each matching key group. The proposed action does not correct that mechanism; use: Validate cardinality and deduplicate or aggregate the appropriate side before joining.
Question 532
At Rosehill Diagnostics, during an internal acceptance test (fictional study case R280-C107-2), a customer join produces 20 times as many records because both datasets have duplicate customer IDs. 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.
- The hinted build side is too large to replicate safely to each executor.
- Cross joins form all pair combinations rather than matching business keys.
- The join predicate is incomplete for the composite primary key.
- Duplicate join keys cause Cartesian multiplication within each matching key group.
Explanation
Correct Answer
D:The failure is explained by: Duplicate join keys cause Cartesian multiplication within each matching key group. A customer join produces 20 times as many records because both datasets have duplicate customer IDs. Correcting it would require: Validate cardinality and deduplicate or aggregate the appropriate side before joining.
Incorrect Answers
A:The hinted build side is too large to replicate safely to each executor. That explanation needs evidence of another fault. The specific mechanism here is: Duplicate join keys cause Cartesian multiplication within each matching key group.
B:Cross joins form all pair combinations rather than matching business keys. That explanation needs evidence of another fault. The specific mechanism here is: Duplicate join keys cause Cartesian multiplication within each matching key group.
C:The join predicate is incomplete for the composite primary key. This is not the root cause established for the reported condition: A customer join produces 20 times as many records because both datasets have duplicate customer IDs. The cause is: Duplicate join keys cause Cartesian multiplication within each matching key group.
Question 533
At Redwood Transit, after a routine data refresh (fictional study case R280-C107-1), a customer join produces 20 times as many records because both datasets have duplicate customer IDs. 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.
- Count duplicates and joined rows per key in both inputs.
- Compare estimated relation size with executor memory and physical join plan.
- Compare predicted product of row counts with key-match counts.
- Inspect duplicate matches per composite key in a small fixture.
Explanation
Correct Answer
A:The needed observation is: Count duplicates and joined rows per key in both inputs. The suspected failure is: Duplicate join keys cause Cartesian multiplication within each matching key group. The repair should only follow that check.
Incorrect Answers
B:Compare estimated relation size with executor memory and physical join plan. That does not establish whether the stated cause is present: Duplicate join keys cause Cartesian multiplication within each matching key group. The diagnostic is: Count duplicates and joined rows per key in both inputs.
C:Compare predicted product of row counts with key-match counts. The case requires a discriminating check before any change, not the offered alternative. Use: Count duplicates and joined rows per key in both inputs.
D:Inspect duplicate matches per composite key in a small fixture. The case requires a discriminating check before any change, not the offered alternative. Use: Count duplicates and joined rows per key in both inputs.
Question 534
At Meadowvale Robotics, while debugging a failed notebook (fictional study case R280-C107-2), a customer join produces 20 times as many records because both datasets have duplicate customer IDs. 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 join succeeds without executor OOM and returns correct rows.
- The output contains intended key matches rather than arbitrary combinations.
- Each line item associates with its intended product once.
- Output matches the agreed relationship cardinality.
Explanation
Correct Answer
D:The verification result must be: Output matches the agreed relationship cardinality. It is stronger evidence than merely performing: Count duplicates and joined rows per key in both inputs.
Incorrect Answers
A:The join succeeds without executor OOM and returns correct rows. Implementation or a check alone is not proof of success. The measurable end state is: Output matches the agreed relationship cardinality.
B:The output contains intended key matches rather than arbitrary combinations. Implementation or a check alone is not proof of success. The measurable end state is: Output matches the agreed relationship cardinality.
C:Each line item associates with its intended product once. The alternative cannot demonstrate that the issue has been corrected: A customer join produces 20 times as many records because both datasets have duplicate customer IDs. The required result is: Output matches the agreed relationship cardinality.
Question 535
At Northridge Retail, during a performance incident (fictional study case R280-C107-1), a customer join produces 20 times as many records because both datasets have duplicate customer IDs. 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.
- Change join strategy only for the oversized dimension.
- Correct this join relation only.
- Address the duplicate-key source without dropping legitimate facts.
- Fix join predicates for these two tables.
Explanation
Correct Answer
C:Address the duplicate-key source without dropping legitimate facts. This limits the change while addressing: Duplicate join keys cause Cartesian multiplication within each matching key group. The expected outcome is: Output matches the agreed relationship cardinality.
Incorrect Answers
A:Change join strategy only for the oversized dimension. The action does not preserve the identified scope boundary: Address the duplicate-key source without dropping legitimate facts.
B:Correct this join relation only. This does not enforce the required scope: Address the duplicate-key source without dropping legitimate facts. The specific failure is: Duplicate join keys cause Cartesian multiplication within each matching key group.
D:Fix join predicates for these two tables. The action does not preserve the identified scope boundary: Address the duplicate-key source without dropping legitimate facts.
Question 536
At Northstar Payments, while optimizing an ETL application (fictional study case R280-C108-1), a developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. 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.
- Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
- Use an equijoin on the required business keys and validate expected cardinality.
- Join on both `order_id` and `line_no` with type-consistent keys.
- Use a left outer join and explicitly handle missing right-side prices.
Explanation
Correct Answer
A:A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The underlying cause is: The hinted build side is too large to replicate safely to each executor. The corrective step is: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters. Validate the outcome: The join succeeds without executor OOM and returns correct rows.
Incorrect Answers
B:Use an equijoin on the required business keys and validate expected cardinality. That would not resolve the reported problem: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The source-supported intervention is: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
C:Join on both `order_id` and `line_no` with type-consistent keys. That would not resolve the reported problem: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The source-supported intervention is: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
D:Use a left outer join and explicitly handle missing right-side prices. The option targets a different stage or condition. The relevant failure is: The hinted build side is too large to replicate safely to each executor. The needed repair is: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
Question 537
At Cloudhaven Apps, during an internal acceptance test (fictional study case R280-C108-2), a developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. 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.
- Cross joins form all pair combinations rather than matching business keys.
- The join predicate is incomplete for the composite primary key.
- The hinted build side is too large to replicate safely to each executor.
- Inner joins retain only matching keys, not all left-side records.
Explanation
Correct Answer
C:The hinted build side is too large to replicate safely to each executor. This accounts for the observed condition: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The relevant verification is: Compare estimated relation size with executor memory and physical join plan.
Incorrect Answers
A:Cross joins form all pair combinations rather than matching business keys. That explanation needs evidence of another fault. The specific mechanism here is: The hinted build side is too large to replicate safely to each executor.
B:The join predicate is incomplete for the composite primary key. This is not the root cause established for the reported condition: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The cause is: The hinted build side is too large to replicate safely to each executor.
D:Inner joins retain only matching keys, not all left-side records. This is not the root cause established for the reported condition: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The cause is: The hinted build side is too large to replicate safely to each executor.
Question 538
At Bayshore Healthcare, after a routine data refresh (fictional study case R280-C108-1), a developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. 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.
- Compare estimated relation size with executor memory and physical join plan.
- Compare predicted product of row counts with key-match counts.
- Inspect duplicate matches per composite key in a small fixture.
- Compare left input keys with joined keys and null-price counts.
Explanation
Correct Answer
A:Use this focused test: Compare estimated relation size with executor memory and physical join plan. The test distinguishes the reported condition from alternatives by checking: The hinted build side is too large to replicate safely to each executor.
Incorrect Answers
B:Compare predicted product of row counts with key-match counts. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare estimated relation size with executor memory and physical join plan.
C:Inspect duplicate matches per composite key in a small fixture. That does not establish whether the stated cause is present: The hinted build side is too large to replicate safely to each executor. The diagnostic is: Compare estimated relation size with executor memory and physical join plan.
D:Compare left input keys with joined keys and null-price counts. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare estimated relation size with executor memory and physical join plan.
Question 539
At Stonebridge Research, while debugging a failed notebook (fictional study case R280-C108-2), a developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. 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 output contains intended key matches rather than arbitrary combinations.
- Each line item associates with its intended product once.
- The join succeeds without executor OOM and returns correct rows.
- Every product remains in output and unmatched prices are visible.
Explanation
Correct Answer
C:The join succeeds without executor OOM and returns correct rows. This is an observable state after the correction: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters. It confirms the original problem no longer occurs.
Incorrect Answers
A:The output contains intended key matches rather than arbitrary combinations. This is not the observed recovery outcome. Acceptance requires: The join succeeds without executor OOM and returns correct rows.
B:Each line item associates with its intended product once. The alternative cannot demonstrate that the issue has been corrected: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The required result is: The join succeeds without executor OOM and returns correct rows.
D:Every product remains in output and unmatched prices are visible. This is not the observed recovery outcome. Acceptance requires: The join succeeds without executor OOM and returns correct rows.
Question 540
At Cedarline Telecommunications, during a performance incident (fictional study case R280-C108-1), a developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. 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 this join relation only.
- Change join strategy only for the oversized dimension.
- Fix join predicates for these two tables.
- Change join type for the inventory enrichment only.
Explanation
Correct Answer
B:The relevant boundary is: Change join strategy only for the oversized dimension. The correction remains: Remove the broadcast hint and allow a suitable shuffle join or reduce the dimension using supported filters.
Incorrect Answers
A:Correct this join relation only. The action does not preserve the identified scope boundary: Change join strategy only for the oversized dimension.
C:Fix join predicates for these two tables. It is not the bounded choice for the stated condition: A developer forces `broadcast()` on a multi-gigabyte dimension, crashing executor joins. The permitted change must remain: Change join strategy only for the oversized dimension.
D:Change join type for the inventory enrichment only. This does not enforce the required scope: Change join strategy only for the oversized dimension. The specific failure is: The hinted build side is too large to replicate safely to each executor.