Certified Associate Developer for Apache Spark Practice Test 34
Question 330
At Aspen Public Services, while optimizing an ETL application (fictional study case R280-C066-1), an engineer points a new managed table at a file path already owned by another table, and creation fails. 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 ordering at the consuming query, not every upstream writer.
- Allocate a nonoverlapping path for the requested table.
- Change refresh semantics only for this table.
- Refresh the single affected external table.
Explanation
Correct Answer
B:Allocate a nonoverlapping path for the requested table. This limits the change while addressing: Catalog-managed storage locations have ownership and existence constraints that were ignored. The expected outcome is: The table writes without overwriting another managed dataset.
Incorrect Answers
A:Add ordering at the consuming query, not every upstream writer. The action does not preserve the identified scope boundary: Allocate a nonoverlapping path for the requested table.
C:Change refresh semantics only for this table. This does not enforce the required scope: Allocate a nonoverlapping path for the requested table. The specific failure is: Catalog-managed storage locations have ownership and existence constraints that were ignored.
D:Refresh the single affected external table. The action does not preserve the identified scope boundary: Allocate a nonoverlapping path for the requested table.
Question 331
At Juniper Foods, after a Spark runtime upgrade (fictional study case R280-C067-1), a per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. 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 the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
- Run the supported metadata/partition refresh operation for that table.
- Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract.
- Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
Explanation
Correct Answer
C:Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract. The technical or governance gap is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. Check the affected state using: Compare per-partition sorted blocks with a full read under an explicit sort.
Incorrect Answers
A:Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append. That would not resolve the reported problem: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The source-supported intervention is: Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract.
B:Run the supported metadata/partition refresh operation for that table. That would not resolve the reported problem: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The source-supported intervention is: Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract.
D:Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters. The option targets a different stage or condition. The relevant failure is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. The needed repair is: Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract.
Question 332
At Silverpeak Bioinformatics, when validating a daily batch (fictional study case R280-C067-2), a per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. 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 workload uses append semantics even though each run contains all current records.
- Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads.
- Catalog partition metadata is stale relative to external partition directories.
- Global sorting is expensive and the key does not provide useful retrieval clustering.
Explanation
Correct Answer
B:Investigation should distinguish this specific mechanism: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. The related symptom is: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The discriminating check is: Compare per-partition sorted blocks with a full read under an explicit sort.
Incorrect Answers
A:The workload uses append semantics even though each run contains all current records. That explanation needs evidence of another fault. The specific mechanism here is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads.
C:Catalog partition metadata is stale relative to external partition directories. That explanation needs evidence of another fault. The specific mechanism here is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads.
D:Global sorting is expensive and the key does not provide useful retrieval clustering. The observed failure instead follows from: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. The alternative does not explain the same dependency.
Question 333
At Willowbank Software, when reviewing an incremental load (fictional study case R280-C067-1), a per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. 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 snapshot identity and duplicate business keys across runs.
- Compare actual new directories with catalog-listed partitions before and after refresh.
- Compare shuffle bytes and filter times on sample workloads.
- Compare per-partition sorted blocks with a full read under an explicit sort.
Explanation
Correct Answer
D:Compare per-partition sorted blocks with a full read under an explicit sort. This gathers evidence about the stated mechanism: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. The existing symptom is: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order.
Incorrect Answers
A:Compare snapshot identity and duplicate business keys across runs. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare per-partition sorted blocks with a full read under an explicit sort.
B:Compare actual new directories with catalog-listed partitions before and after refresh. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare per-partition sorted blocks with a full read under an explicit sort.
C:Compare shuffle bytes and filter times on sample workloads. That does not establish whether the stated cause is present: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads. The diagnostic is: Compare per-partition sorted blocks with a full read under an explicit sort.
Question 334
At Seabrook Education, before a production rollout (fictional study case R280-C067-2), a per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. 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.
- Only one logical copy of each current record remains after rerun.
- New partitions become queryable without reloading unrelated tables.
- Export runtime decreases without degrading target query performance.
- The final ordered result is deterministic for specified tie-breakers.
Explanation
Correct Answer
D:The final ordered result is deterministic for specified tie-breakers. This demonstrates the intended effect of: Apply explicit `orderBy()` in the consuming query when global ordering is part of the contract. The prior failure was: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order.
Incorrect Answers
A:Only one logical copy of each current record remains after rerun. Implementation or a check alone is not proof of success. The measurable end state is: The final ordered result is deterministic for specified tie-breakers.
B:New partitions become queryable without reloading unrelated tables. The alternative cannot demonstrate that the issue has been corrected: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The required result is: The final ordered result is deterministic for specified tie-breakers.
C:Export runtime decreases without degrading target query performance. Implementation or a check alone is not proof of success. The measurable end state is: The final ordered result is deterministic for specified tie-breakers.
Question 335
At Bluewater Energy, while optimizing an ETL application (fictional study case R280-C067-1), a per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. 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 refresh semantics only for this table.
- Refresh the single affected external table.
- Change table sort strategy after measuring the affected reports.
- Add ordering at the consuming query, not every upstream writer.
Explanation
Correct Answer
D:Keep the intervention within this boundary: Add ordering at the consuming query, not every upstream writer. The reported failure mechanism is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads.
Incorrect Answers
A:Change refresh semantics only for this table. It is not the bounded choice for the stated condition: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The permitted change must remain: Add ordering at the consuming query, not every upstream writer.
B:Refresh the single affected external table. It is not the bounded choice for the stated condition: A per-partition sort is used before saving, but subsequent distributed reads return rows in a different overall order. The permitted change must remain: Add ordering at the consuming query, not every upstream writer.
C:Change table sort strategy after measuring the affected reports. This does not enforce the required scope: Add ordering at the consuming query, not every upstream writer. The specific failure is: Distributed storage and `sortWithinPartitions()` do not promise a global output order on later reads.
Question 336
At Meridian Commerce, after a Spark runtime upgrade (fictional study case R280-C068-1), a recurring report doubles row counts after a job appends a full replacement snapshot to an existing 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.
- Run the supported metadata/partition refresh operation for that table.
- Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
- Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
- Save the DataFrame as a persistent managed or external table under the intended catalog and schema.
Explanation
Correct Answer
C:The observed defect follows from: The workload uses append semantics even though each run contains all current records. The appropriate correction is: Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append. Confirm the result by verifying: Only one logical copy of each current record remains after rerun.
Incorrect Answers
A:Run the supported metadata/partition refresh operation for that table. That would not resolve the reported problem: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The source-supported intervention is: Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
B:Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters. That would not resolve the reported problem: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The source-supported intervention is: Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
D:Save the DataFrame as a persistent managed or external table under the intended catalog and schema. That would not resolve the reported problem: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The source-supported intervention is: Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
Question 337
At Copperline Finance, when validating a daily batch (fictional study case R280-C068-2), a recurring report doubles row counts after a job appends a full replacement snapshot to an existing 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.
- Catalog partition metadata is stale relative to external partition directories.
- The workload uses append semantics even though each run contains all current records.
- Global sorting is expensive and the key does not provide useful retrieval clustering.
- Session temporary views are not persistent catalog tables and disappear when their session ends.
Explanation
Correct Answer
B:Investigation should distinguish this specific mechanism: The workload uses append semantics even though each run contains all current records. The related symptom is: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The discriminating check is: Compare snapshot identity and duplicate business keys across runs.
Incorrect Answers
A:Catalog partition metadata is stale relative to external partition directories. This is not the root cause established for the reported condition: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The cause is: The workload uses append semantics even though each run contains all current records.
C:Global sorting is expensive and the key does not provide useful retrieval clustering. The observed failure instead follows from: The workload uses append semantics even though each run contains all current records. The alternative does not explain the same dependency.
D:Session temporary views are not persistent catalog tables and disappear when their session ends. That explanation needs evidence of another fault. The specific mechanism here is: The workload uses append semantics even though each run contains all current records.
Question 338
At Pinecrest Media, when reviewing an incremental load (fictional study case R280-C068-1), a recurring report doubles row counts after a job appends a full replacement snapshot to an existing 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.
- Compare actual new directories with catalog-listed partitions before and after refresh.
- Compare snapshot identity and duplicate business keys across runs.
- Compare shuffle bytes and filter times on sample workloads.
- Query catalog metadata from a fresh SparkSession after the original session exits.
Explanation
Correct Answer
B:Compare snapshot identity and duplicate business keys across runs. This gathers evidence about the stated mechanism: The workload uses append semantics even though each run contains all current records. The existing symptom is: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table.
Incorrect Answers
A:Compare actual new directories with catalog-listed partitions before and after refresh. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare snapshot identity and duplicate business keys across runs.
C:Compare shuffle bytes and filter times on sample workloads. That does not establish whether the stated cause is present: The workload uses append semantics even though each run contains all current records. The diagnostic is: Compare snapshot identity and duplicate business keys across runs.
D:Query catalog metadata from a fresh SparkSession after the original session exits. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare snapshot identity and duplicate business keys across runs.
Question 339
At Ironlake Networks, before a production rollout (fictional study case R280-C068-2), a recurring report doubles row counts after a job appends a full replacement snapshot to an existing 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.
- Only one logical copy of each current record remains after rerun.
- New partitions become queryable without reloading unrelated tables.
- Export runtime decreases without degrading target query performance.
- The table is discoverable and queryable across sessions under approved access.
Explanation
Correct Answer
A:Acceptance requires: Only one logical copy of each current record remains after rerun. That directly tests whether the mechanism was corrected: The workload uses append semantics even though each run contains all current records.
Incorrect Answers
B:New partitions become queryable without reloading unrelated tables. This is not the observed recovery outcome. Acceptance requires: Only one logical copy of each current record remains after rerun.
C:Export runtime decreases without degrading target query performance. This is not the observed recovery outcome. Acceptance requires: Only one logical copy of each current record remains after rerun.
D:The table is discoverable and queryable across sessions under approved access. The alternative cannot demonstrate that the issue has been corrected: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The required result is: Only one logical copy of each current record remains after rerun.
Question 340
At Valleywide Travel, while optimizing an ETL application (fictional study case R280-C068-1), a recurring report doubles row counts after a job appends a full replacement snapshot to an existing 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.
- Refresh the single affected external table.
- Change table sort strategy after measuring the affected reports.
- Persist only the shared reporting relation.
- Change refresh semantics only for this table.
Explanation
Correct Answer
D:The relevant boundary is: Change refresh semantics only for this table. The correction remains: Use the approved full-refresh overwrite or a keyed merge strategy where supported instead of unconditional append.
Incorrect Answers
A:Refresh the single affected external table. It is not the bounded choice for the stated condition: A recurring report doubles row counts after a job appends a full replacement snapshot to an existing table. The permitted change must remain: Change refresh semantics only for this table.
B:Change table sort strategy after measuring the affected reports. The action does not preserve the identified scope boundary: Change refresh semantics only for this table.
C:Persist only the shared reporting relation. This does not enforce the required scope: Change refresh semantics only for this table. The specific failure is: The workload uses append semantics even though each run contains all current records.