Certified Associate Developer for Apache Spark Practice Test 35
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.
Question 341
At Harbor Data Labs, after a Spark runtime upgrade (fictional study case R280-C069-1), files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. 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 unjustified global sort or choose a better-supported layout keyed to actual query filters.
- Save the DataFrame as a persistent managed or external table under the intended catalog and schema.
- Run the supported metadata/partition refresh operation for that table.
- Write and register the table with a valid partition column and test partition pruning.
Explanation
Correct Answer
C:Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The underlying cause is: Catalog partition metadata is stale relative to external partition directories. The corrective step is: Run the supported metadata/partition refresh operation for that table. Validate the outcome: New partitions become queryable without reloading unrelated tables.
Incorrect Answers
A:Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters. The recorded mechanism is: Catalog partition metadata is stale relative to external partition directories. The proposed action does not correct that mechanism; use: Run the supported metadata/partition refresh operation for that table.
B:Save the DataFrame as a persistent managed or external table under the intended catalog and schema. The option targets a different stage or condition. The relevant failure is: Catalog partition metadata is stale relative to external partition directories. The needed repair is: Run the supported metadata/partition refresh operation for that table.
D:Write and register the table with a valid partition column and test partition pruning. That would not resolve the reported problem: Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The source-supported intervention is: Run the supported metadata/partition refresh operation for that table.
Question 342
At Oakline Transportation, when validating a daily batch (fictional study case R280-C069-2), files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. 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 sorting is expensive and the key does not provide useful retrieval clustering.
- Catalog partition metadata is stale relative to external partition directories.
- Session temporary views are not persistent catalog tables and disappear when their session ends.
- The storage/table layout does not expose `event_date` as a partition column.
Explanation
Correct Answer
B:Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The supporting root cause is: Catalog partition metadata is stale relative to external partition directories. The appropriate remedy is: Run the supported metadata/partition refresh operation for that table.
Incorrect Answers
A:Global sorting is expensive and the key does not provide useful retrieval clustering. This is not the root cause established for the reported condition: Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The cause is: Catalog partition metadata is stale relative to external partition directories.
C: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: Catalog partition metadata is stale relative to external partition directories.
D:The storage/table layout does not expose `event_date` as a partition column. This is not the root cause established for the reported condition: Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The cause is: Catalog partition metadata is stale relative to external partition directories.
Question 343
At Rosehill Diagnostics, when reviewing an incremental load (fictional study case R280-C069-1), files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. 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 shuffle bytes and filter times on sample workloads.
- Query catalog metadata from a fresh SparkSession after the original session exits.
- Inspect table metadata, partition layout and query scan paths.
Explanation
Correct Answer
A:Diagnose the affected path with: Compare actual new directories with catalog-listed partitions before and after refresh. This tests the case-specific cause: Catalog partition metadata is stale relative to external partition directories.
Incorrect Answers
B:Compare shuffle bytes and filter times on sample workloads. That does not establish whether the stated cause is present: Catalog partition metadata is stale relative to external partition directories. The diagnostic is: Compare actual new directories with catalog-listed partitions before and after refresh.
C:Query catalog metadata from a fresh SparkSession after the original session exits. That does not establish whether the stated cause is present: Catalog partition metadata is stale relative to external partition directories. The diagnostic is: Compare actual new directories with catalog-listed partitions before and after refresh.
D:Inspect table metadata, partition layout and query scan paths. The case requires a discriminating check before any change, not the offered alternative. Use: Compare actual new directories with catalog-listed partitions before and after refresh.
Question 344
At Redwood Transit, before a production rollout (fictional study case R280-C069-2), files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. 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.
- 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.
- A day-filtered query reads relevant date partitions with unchanged results.
Explanation
Correct Answer
A:New partitions become queryable without reloading unrelated tables. This is an observable state after the correction: Run the supported metadata/partition refresh operation for that table. It confirms the original problem no longer occurs.
Incorrect Answers
B:Export runtime decreases without degrading target query performance. Implementation or a check alone is not proof of success. The measurable end state is: New partitions become queryable without reloading unrelated tables.
C:The table is discoverable and queryable across sessions under approved access. The alternative cannot demonstrate that the issue has been corrected: Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The required result is: New partitions become queryable without reloading unrelated tables.
D:A day-filtered query reads relevant date partitions with unchanged results. This is not the observed recovery outcome. Acceptance requires: New partitions become queryable without reloading unrelated tables.
Question 345
At Meadowvale Robotics, while optimizing an ETL application (fictional study case R280-C069-1), files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. 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 table sort strategy after measuring the affected reports.
- Refresh the single affected external table.
- Persist only the shared reporting relation.
- Rebuild partitioning only for this reporting table.
Explanation
Correct Answer
B:Keep the intervention within this boundary: Refresh the single affected external table. The reported failure mechanism is: Catalog partition metadata is stale relative to external partition directories.
Incorrect Answers
A:Change table sort strategy after measuring the affected reports. It is not the bounded choice for the stated condition: Files are added outside Spark to a partitioned external table, but Spark SQL does not see new partitions. The permitted change must remain: Refresh the single affected external table.
C:Persist only the shared reporting relation. This does not enforce the required scope: Refresh the single affected external table. The specific failure is: Catalog partition metadata is stale relative to external partition directories.
D:Rebuild partitioning only for this reporting table. This does not enforce the required scope: Refresh the single affected external table. The specific failure is: Catalog partition metadata is stale relative to external partition directories.
Question 346
At Northridge Retail, after a Spark runtime upgrade (fictional study case R280-C070-1), a table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. 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.
- Save the DataFrame as a persistent managed or external table under the intended catalog and schema.
- Write and register the table with a valid partition column and test partition pruning.
- Use appropriate partition and file organization and measure actual filter performance rather than claiming an index.
- Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
Explanation
Correct Answer
D:Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters. This addresses the documented mechanism: Global sorting is expensive and the key does not provide useful retrieval clustering. Recovery is demonstrated when: Export runtime decreases without degrading target query performance.
Incorrect Answers
A:Save the DataFrame as a persistent managed or external table under the intended catalog and schema. The recorded mechanism is: Global sorting is expensive and the key does not provide useful retrieval clustering. The proposed action does not correct that mechanism; use: Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
B:Write and register the table with a valid partition column and test partition pruning. The option targets a different stage or condition. The relevant failure is: Global sorting is expensive and the key does not provide useful retrieval clustering. The needed repair is: Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
C:Use appropriate partition and file organization and measure actual filter performance rather than claiming an index. The option targets a different stage or condition. The relevant failure is: Global sorting is expensive and the key does not provide useful retrieval clustering. The needed repair is: Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
Question 347
At Northstar Payments, when validating a daily batch (fictional study case R280-C070-2), a table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. 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 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.
- The storage/table layout does not expose `event_date` as a partition column.
- Sorting a distributed table does not create a database-style secondary index with that performance guarantee.
Explanation
Correct Answer
A:A table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. The supporting root cause is: Global sorting is expensive and the key does not provide useful retrieval clustering. The appropriate remedy is: Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
Incorrect Answers
B:Session temporary views are not persistent catalog tables and disappear when their session ends. The observed failure instead follows from: Global sorting is expensive and the key does not provide useful retrieval clustering. The alternative does not explain the same dependency.
C:The storage/table layout does not expose `event_date` as a partition column. The observed failure instead follows from: Global sorting is expensive and the key does not provide useful retrieval clustering. The alternative does not explain the same dependency.
D:Sorting a distributed table does not create a database-style secondary index with that performance guarantee. The observed failure instead follows from: Global sorting is expensive and the key does not provide useful retrieval clustering. The alternative does not explain the same dependency.
Question 348
At Cloudhaven Apps, when reviewing an incremental load (fictional study case R280-C070-1), a table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. 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.
- Query catalog metadata from a fresh SparkSession after the original session exits.
- Inspect table metadata, partition layout and query scan paths.
- Compare physical plan file scans and filter latency across keyed lookups.
- Compare shuffle bytes and filter times on sample workloads.
Explanation
Correct Answer
D:Compare shuffle bytes and filter times on sample workloads. This gathers evidence about the stated mechanism: Global sorting is expensive and the key does not provide useful retrieval clustering. The existing symptom is: A table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups.
Incorrect Answers
A: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 shuffle bytes and filter times on sample workloads.
B:Inspect table metadata, partition layout and query scan paths. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare shuffle bytes and filter times on sample workloads.
C:Compare physical plan file scans and filter latency across keyed lookups. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare shuffle bytes and filter times on sample workloads.
Question 349
At Bayshore Healthcare, before a production rollout (fictional study case R280-C070-2), a table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. 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.
- Export runtime decreases without degrading target query performance.
- The table is discoverable and queryable across sessions under approved access.
- A day-filtered query reads relevant date partitions with unchanged results.
- Lookup latency meets measured targets with documented storage design.
Explanation
Correct Answer
A:Acceptance requires: Export runtime decreases without degrading target query performance. That directly tests whether the mechanism was corrected: Global sorting is expensive and the key does not provide useful retrieval clustering.
Incorrect Answers
B:The table is discoverable and queryable across sessions under approved access. The alternative cannot demonstrate that the issue has been corrected: A table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. The required result is: Export runtime decreases without degrading target query performance.
C:A day-filtered query reads relevant date partitions with unchanged results. Implementation or a check alone is not proof of success. The measurable end state is: Export runtime decreases without degrading target query performance.
D:Lookup latency meets measured targets with documented storage design. This is not the observed recovery outcome. Acceptance requires: Export runtime decreases without degrading target query performance.
Question 350
At Stonebridge Research, while optimizing an ETL application (fictional study case R280-C070-1), a table export globally sorts by a two-value flag, causing a large shuffle but little benefit to later lookups. 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 table sort strategy after measuring the affected reports.
- Persist only the shared reporting relation.
- Rebuild partitioning only for this reporting table.
- Tune this table's layout; do not invent unsupported indexing semantics.
Explanation
Correct Answer
A:The relevant boundary is: Change table sort strategy after measuring the affected reports. The correction remains: Remove the unjustified global sort or choose a better-supported layout keyed to actual query filters.
Incorrect Answers
B:Persist only the shared reporting relation. The action does not preserve the identified scope boundary: Change table sort strategy after measuring the affected reports.
C:Rebuild partitioning only for this reporting table. This does not enforce the required scope: Change table sort strategy after measuring the affected reports. The specific failure is: Global sorting is expensive and the key does not provide useful retrieval clustering.
D:Tune this table's layout; do not invent unsupported indexing semantics. This does not enforce the required scope: Change table sort strategy after measuring the affected reports. The specific failure is: Global sorting is expensive and the key does not provide useful retrieval clustering.