Certified Associate Developer for Apache Spark Practice Test 55
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.
Question 541
At Cobalt Analytics, while optimizing an ETL application (fictional study case R280-C109-1), a developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. 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.
- Join on both `order_id` and `line_no` with type-consistent keys.
- Use a left outer join and explicitly handle missing right-side prices.
- Use `unionByName` with compatible types and explicit missing-column policy.
- Use an equijoin on the required business keys and validate expected cardinality.
Explanation
Correct Answer
D:The failure mechanism is: Cross joins form all pair combinations rather than matching business keys. Apply the bounded change: Use an equijoin on the required business keys and validate expected cardinality. The acceptance test must show: The output contains intended key matches rather than arbitrary combinations.
Incorrect Answers
A:Join on both `order_id` and `line_no` with type-consistent keys. That would not resolve the reported problem: A developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. The source-supported intervention is: Use an equijoin on the required business keys and validate expected cardinality.
B:Use a left outer join and explicitly handle missing right-side prices. The recorded mechanism is: Cross joins form all pair combinations rather than matching business keys. The proposed action does not correct that mechanism; use: Use an equijoin on the required business keys and validate expected cardinality.
C:Use `unionByName` with compatible types and explicit missing-column policy. The recorded mechanism is: Cross joins form all pair combinations rather than matching business keys. The proposed action does not correct that mechanism; use: Use an equijoin on the required business keys and validate expected cardinality.
Question 542
At Summit Supply, during an internal acceptance test (fictional study case R280-C109-2), a developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. 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.
- Inner joins retain only matching keys, not all left-side records.
- `union` aligns columns by position rather than automatically by name.
Explanation
Correct Answer
A:Investigation should distinguish this specific mechanism: Cross joins form all pair combinations rather than matching business keys. The related symptom is: A developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. The discriminating check is: Compare predicted product of row counts with key-match counts.
Incorrect Answers
B:The join predicate is incomplete for the composite primary key. The observed failure instead follows from: Cross joins form all pair combinations rather than matching business keys. The alternative does not explain the same dependency.
C:Inner joins retain only matching keys, not all left-side records. The observed failure instead follows from: Cross joins form all pair combinations rather than matching business keys. The alternative does not explain the same dependency.
D:`union` aligns columns by position rather than automatically by name. That explanation needs evidence of another fault. The specific mechanism here is: Cross joins form all pair combinations rather than matching business keys.
Question 543
At Granite Insurance, after a routine data refresh (fictional study case R280-C109-1), a developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. 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 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.
- Compare both schemas and a fixture row from each input.
Explanation
Correct Answer
A:The needed observation is: Compare predicted product of row counts with key-match counts. The suspected failure is: Cross joins form all pair combinations rather than matching business keys. The repair should only follow that check.
Incorrect Answers
B:Inspect duplicate matches per composite key in a small fixture. That does not establish whether the stated cause is present: Cross joins form all pair combinations rather than matching business keys. The diagnostic is: Compare predicted product of row counts with key-match counts.
C: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 predicted product of row counts with key-match counts.
D:Compare both schemas and a fixture row from each input. The case requires a discriminating check before any change, not the offered alternative. Use: Compare predicted product of row counts with key-match counts.
Question 544
At Elmwood Manufacturing, while debugging a failed notebook (fictional study case R280-C109-2), a developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. 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.
- Each line item associates with its intended product once.
- Every product remains in output and unmatched prices are visible.
- The output contains intended key matches rather than arbitrary combinations.
- Values align under the intended field names.
Explanation
Correct Answer
C:The verification result must be: The output contains intended key matches rather than arbitrary combinations. It is stronger evidence than merely performing: Compare predicted product of row counts with key-match counts.
Incorrect Answers
A:Each line item associates with its intended product once. This is not the observed recovery outcome. Acceptance requires: The output contains intended key matches rather than arbitrary combinations.
B:Every product remains in output and unmatched prices are visible. This is not the observed recovery outcome. Acceptance requires: The output contains intended key matches rather than arbitrary combinations.
D:Values align under the intended field names. Implementation or a check alone is not proof of success. The measurable end state is: The output contains intended key matches rather than arbitrary combinations.
Question 545
At Lakeside Devices, during a performance incident (fictional study case R280-C109-1), a developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. 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.
- Fix join predicates for these two tables.
- Change join type for the inventory enrichment only.
- Fix only the two-feed combination.
- Correct this join relation only.
Explanation
Correct Answer
D:The approved limit is: Correct this join relation only. It avoids applying the corrective step beyond the stated failure: A developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations.
Incorrect Answers
A:Fix join predicates for these two tables. It is not the bounded choice for the stated condition: A developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. The permitted change must remain: Correct this join relation only.
B:Change join type for the inventory enrichment only. It is not the bounded choice for the stated condition: A developer forgets the join predicate and explicitly uses `crossJoin` on two large tables, creating billions of combinations. The permitted change must remain: Correct this join relation only.
C:Fix only the two-feed combination. The action does not preserve the identified scope boundary: Correct this join relation only.
Question 546
At Bayfront Markets, while optimizing an ETL application (fictional study case R280-C110-1), a compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. 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.
- Use a left outer join and explicitly handle missing right-side prices.
- Use `unionByName` with compatible types and explicit missing-column policy.
- 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
D:The failure mechanism is: The join predicate is incomplete for the composite primary key. Apply the bounded change: Join on both `order_id` and `line_no` with type-consistent keys. The acceptance test must show: Each line item associates with its intended product once.
Incorrect Answers
A:Use a left outer join and explicitly handle missing right-side prices. The recorded mechanism is: The join predicate is incomplete for the composite primary key. The proposed action does not correct that mechanism; use: Join on both `order_id` and `line_no` with type-consistent keys.
B:Use `unionByName` with compatible types and explicit missing-column policy. The recorded mechanism is: The join predicate is incomplete for the composite primary key. The proposed action does not correct that mechanism; use: Join on both `order_id` and `line_no` with type-consistent keys.
C:Validate cardinality and deduplicate or aggregate the appropriate side before joining. The recorded mechanism is: The join predicate is incomplete for the composite primary key. The proposed action does not correct that mechanism; use: Join on both `order_id` and `line_no` with type-consistent keys.
Question 547
At Orion Fintech, during an internal acceptance test (fictional study case R280-C110-2), a compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. 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.
- Inner joins retain only matching keys, not all left-side records.
- The join predicate is incomplete for the composite primary key.
- `union` aligns columns by position rather than automatically by name.
- Duplicate join keys cause Cartesian multiplication within each matching key group.
Explanation
Correct Answer
B:The reported symptom is: A compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. Its direct cause is: The join predicate is incomplete for the composite primary key. Test that conclusion using: Inspect duplicate matches per composite key in a small fixture.
Incorrect Answers
A:Inner joins retain only matching keys, not all left-side records. This is not the root cause established for the reported condition: A compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. The cause is: The join predicate is incomplete for the composite primary key.
C:`union` aligns columns by position rather than automatically by name. That explanation needs evidence of another fault. The specific mechanism here is: The join predicate is incomplete for the composite primary key.
D:Duplicate join keys cause Cartesian multiplication within each matching key group. The observed failure instead follows from: The join predicate is incomplete for the composite primary key. The alternative does not explain the same dependency.
Question 548
At Westfield Insights, after a routine data refresh (fictional study case R280-C110-1), a compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. 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 left input keys with joined keys and null-price counts.
- Inspect duplicate matches per composite key in a small fixture.
- Compare both schemas and a fixture row from each input.
- Count duplicates and joined rows per key in both inputs.
Explanation
Correct Answer
B:Use this focused test: Inspect duplicate matches per composite key in a small fixture. The test distinguishes the reported condition from alternatives by checking: The join predicate is incomplete for the composite primary key.
Incorrect Answers
A:Compare left input keys with joined keys and null-price counts. That does not establish whether the stated cause is present: The join predicate is incomplete for the composite primary key. The diagnostic is: Inspect duplicate matches per composite key in a small fixture.
C:Compare both schemas and a fixture row from each input. That does not establish whether the stated cause is present: The join predicate is incomplete for the composite primary key. The diagnostic is: Inspect duplicate matches per composite key in a small fixture.
D:Count duplicates and joined rows per key in both inputs. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect duplicate matches per composite key in a small fixture.
Question 549
At Mapleford Engineering, while debugging a failed notebook (fictional study case R280-C110-2), a compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. 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.
- Every product remains in output and unmatched prices are visible.
- Values align under the intended field names.
- Output matches the agreed relationship cardinality.
- Each line item associates with its intended product once.
Explanation
Correct Answer
D:A passing check shows: Each line item associates with its intended product once. This is evidence for the scoped change: Join on both `order_id` and `line_no` with type-consistent keys.
Incorrect Answers
A:Every product remains in output and unmatched prices are visible. This is not the observed recovery outcome. Acceptance requires: Each line item associates with its intended product once.
B:Values align under the intended field names. This is not the observed recovery outcome. Acceptance requires: Each line item associates with its intended product once.
C:Output matches the agreed relationship cardinality. Implementation or a check alone is not proof of success. The measurable end state is: Each line item associates with its intended product once.
Question 550
At Horizon Logistics, during a performance incident (fictional study case R280-C110-1), a compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. 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 type for the inventory enrichment only.
- Fix only the two-feed combination.
- Fix join predicates for these two tables.
- Address the duplicate-key source without dropping legitimate facts.
Explanation
Correct Answer
C:Keep the intervention within this boundary: Fix join predicates for these two tables. The reported failure mechanism is: The join predicate is incomplete for the composite primary key.
Incorrect Answers
A:Change join type for the inventory enrichment only. It is not the bounded choice for the stated condition: A compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. The permitted change must remain: Fix join predicates for these two tables.
B:Fix only the two-feed combination. It is not the bounded choice for the stated condition: A compound order detail join matches on order ID but omits line number, assigning all line items to multiple products. The permitted change must remain: Fix join predicates for these two tables.
D:Address the duplicate-key source without dropping legitimate facts. The action does not preserve the identified scope boundary: Fix join predicates for these two tables.