Certified Associate Developer for Apache Spark Practice Test 28
Question 270
At Seabrook Education, when reviewing an incremental load (fictional study case R280-C054-1), a daily job succeeds without changing a preexisting output directory because it uses `mode('ignore')`. 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 write mode only for the daily export path.
- Apply corrupt-record policy to this JSON feed.
- Correct only the CSV source schema and dependent queries.
- Apply the codec to the evaluated ORC dataset only.
Explanation
Correct Answer
A:Change write mode only for the daily export path. This limits the change while addressing: Ignore mode skips writing when the destination already exists instead of updating that dataset. The expected outcome is: Expected daily updates appear rather than silently being skipped.
Incorrect Answers
B:Apply corrupt-record policy to this JSON feed. This does not enforce the required scope: Change write mode only for the daily export path. The specific failure is: Ignore mode skips writing when the destination already exists instead of updating that dataset.
C:Correct only the CSV source schema and dependent queries. This does not enforce the required scope: Change write mode only for the daily export path. The specific failure is: Ignore mode skips writing when the destination already exists instead of updating that dataset.
D:Apply the codec to the evaluated ORC dataset only. The action does not preserve the identified scope boundary: Change write mode only for the daily export path.
Question 271
At Bluewater Energy, while reconciling a reporting dataset (fictional study case R280-C055-1), a source contains invalid JSON lines but a query assumes every line has validated structured fields. 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.
- Specify the expected field types in DataFrame reader or SQL source declaration before computation.
- Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation.
- Benchmark supported ORC codec choices against real query and I/O patterns before deployment.
- Use a file-based DataFrameWriter save operation to the explicit destination when no table registration is required.
Explanation
Correct Answer
B:A source contains invalid JSON lines but a query assumes every line has validated structured fields. The underlying cause is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source. The corrective step is: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation. Validate the outcome: Invalid data is visible or rejected under policy and legitimate records stay intact.
Incorrect Answers
A:Specify the expected field types in DataFrame reader or SQL source declaration before computation. The recorded mechanism is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source. The proposed action does not correct that mechanism; use: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation.
C:Benchmark supported ORC codec choices against real query and I/O patterns before deployment. That would not resolve the reported problem: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The source-supported intervention is: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation.
D:Use a file-based DataFrameWriter save operation to the explicit destination when no table registration is required. That would not resolve the reported problem: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The source-supported intervention is: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation.
Question 272
At Meridian Commerce, during a pipeline migration (fictional study case R280-C055-2), a source contains invalid JSON lines but a query assumes every line has validated structured fields. 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.
- Path-based reads need explicit schema or casting for reliable numeric operations.
- Compression size alone does not establish query performance or processing cost.
- `saveAsTable` creates or writes a table relation, whereas the requirement was only an external file output.
- Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
Explanation
Correct Answer
D:A source contains invalid JSON lines but a query assumes every line has validated structured fields. The supporting root cause is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source. The appropriate remedy is: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation.
Incorrect Answers
A:Path-based reads need explicit schema or casting for reliable numeric operations. That explanation needs evidence of another fault. The specific mechanism here is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
B:Compression size alone does not establish query performance or processing cost. That explanation needs evidence of another fault. The specific mechanism here is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
C:`saveAsTable` creates or writes a table relation, whereas the requirement was only an external file output. This is not the root cause established for the reported condition: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The cause is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
Question 273
At Copperline Finance, after a Spark runtime upgrade (fictional study case R280-C055-1), a source contains invalid JSON lines but a query assumes every line has validated structured fields. 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 column types and compare sum results before and after casting.
- Measure bytes, scan time and CPU for equal query workloads on both outputs.
- Inspect catalog for newly created tables and compare final output path.
- Feed valid and broken JSON samples through the declared read options.
Explanation
Correct Answer
D:Diagnose the affected path with: Feed valid and broken JSON samples through the declared read options. This tests the case-specific cause: Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
Incorrect Answers
A:Inspect column types and compare sum results before and after casting. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Feed valid and broken JSON samples through the declared read options.
B:Measure bytes, scan time and CPU for equal query workloads on both outputs. The case requires a discriminating check before any change, not the offered alternative. Use: Feed valid and broken JSON samples through the declared read options.
C:Inspect catalog for newly created tables and compare final output path. The case requires a discriminating check before any change, not the offered alternative. Use: Feed valid and broken JSON samples through the declared read options.
Question 274
At Pinecrest Media, when validating a daily batch (fictional study case R280-C055-2), a source contains invalid JSON lines but a query assumes every line has validated structured fields. 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.
- Invalid data is visible or rejected under policy and legitimate records stay intact.
- Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
- Chosen compression meets storage and latency objectives with unchanged rows.
- Required files exist without unexpected catalog objects.
Explanation
Correct Answer
A:Invalid data is visible or rejected under policy and legitimate records stay intact. This is an observable state after the correction: Configure an appropriate permissive/fail-fast policy and explicitly inspect invalid records before downstream aggregation. It confirms the original problem no longer occurs.
Incorrect Answers
B:Numeric aggregates compute accurately and invalid numeric rows are handled deliberately. Implementation or a check alone is not proof of success. The measurable end state is: Invalid data is visible or rejected under policy and legitimate records stay intact.
C:Chosen compression meets storage and latency objectives with unchanged rows. The alternative cannot demonstrate that the issue has been corrected: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The required result is: Invalid data is visible or rejected under policy and legitimate records stay intact.
D:Required files exist without unexpected catalog objects. The alternative cannot demonstrate that the issue has been corrected: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The required result is: Invalid data is visible or rejected under policy and legitimate records stay intact.
Question 275
At Ironlake Networks, when reviewing an incremental load (fictional study case R280-C055-1), a source contains invalid JSON lines but a query assumes every line has validated structured fields. 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 only the CSV source schema and dependent queries.
- Apply the codec to the evaluated ORC dataset only.
- Limit the change to the export sink and metadata cleanup if authorized.
- Apply corrupt-record policy to this JSON feed.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: A source contains invalid JSON lines but a query assumes every line has validated structured fields. The bounded intervention is: Apply corrupt-record policy to this JSON feed. Confirm: Invalid data is visible or rejected under policy and legitimate records stay intact.
Incorrect Answers
A:Correct only the CSV source schema and dependent queries. This does not enforce the required scope: Apply corrupt-record policy to this JSON feed. The specific failure is: Ingestion mode and corrupt-record handling were not evaluated for the JSON source.
B:Apply the codec to the evaluated ORC dataset only. The action does not preserve the identified scope boundary: Apply corrupt-record policy to this JSON feed.
C:Limit the change to the export sink and metadata cleanup if authorized. The action does not preserve the identified scope boundary: Apply corrupt-record policy to this JSON feed.
Question 276
At Valleywide Travel, while reconciling a reporting dataset (fictional study case R280-C056-1), a SQL analyst queries external CSV files without a declared schema and sees all measures as strings. 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.
- Benchmark supported ORC codec choices against real query and I/O patterns before deployment.
- Use a file-based DataFrameWriter save operation to the explicit destination when no table registration is required.
- Extract fields with documented parsing expressions before SQL filters reference them.
- Specify the expected field types in DataFrame reader or SQL source declaration before computation.
Explanation
Correct Answer
D:A SQL analyst queries external CSV files without a declared schema and sees all measures as strings. The underlying cause is: Path-based reads need explicit schema or casting for reliable numeric operations. The corrective step is: Specify the expected field types in DataFrame reader or SQL source declaration before computation. Validate the outcome: Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
Incorrect Answers
A:Benchmark supported ORC codec choices against real query and I/O patterns before deployment. The option targets a different stage or condition. The relevant failure is: Path-based reads need explicit schema or casting for reliable numeric operations. The needed repair is: Specify the expected field types in DataFrame reader or SQL source declaration before computation.
B:Use a file-based DataFrameWriter save operation to the explicit destination when no table registration is required. The option targets a different stage or condition. The relevant failure is: Path-based reads need explicit schema or casting for reliable numeric operations. The needed repair is: Specify the expected field types in DataFrame reader or SQL source declaration before computation.
C:Extract fields with documented parsing expressions before SQL filters reference them. The recorded mechanism is: Path-based reads need explicit schema or casting for reliable numeric operations. The proposed action does not correct that mechanism; use: Specify the expected field types in DataFrame reader or SQL source declaration before computation.
Question 277
At Harbor Data Labs, during a pipeline migration (fictional study case R280-C056-2), a SQL analyst queries external CSV files without a declared schema and sees all measures as strings. 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.
- Compression size alone does not establish query performance or processing cost.
- `saveAsTable` creates or writes a table relation, whereas the requirement was only an external file output.
- Path-based reads need explicit schema or casting for reliable numeric operations.
- Text sources expose raw line value unless parsing derives structured columns.
Explanation
Correct Answer
C:A SQL analyst queries external CSV files without a declared schema and sees all measures as strings. The supporting root cause is: Path-based reads need explicit schema or casting for reliable numeric operations. The appropriate remedy is: Specify the expected field types in DataFrame reader or SQL source declaration before computation.
Incorrect Answers
A:Compression size alone does not establish query performance or processing cost. The observed failure instead follows from: Path-based reads need explicit schema or casting for reliable numeric operations. The alternative does not explain the same dependency.
B:`saveAsTable` creates or writes a table relation, whereas the requirement was only an external file output. The observed failure instead follows from: Path-based reads need explicit schema or casting for reliable numeric operations. The alternative does not explain the same dependency.
D:Text sources expose raw line value unless parsing derives structured columns. That explanation needs evidence of another fault. The specific mechanism here is: Path-based reads need explicit schema or casting for reliable numeric operations.
Question 278
At Oakline Transportation, after a Spark runtime upgrade (fictional study case R280-C056-1), a SQL analyst queries external CSV files without a declared schema and sees all measures as strings. 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.
- Measure bytes, scan time and CPU for equal query workloads on both outputs.
- Inspect catalog for newly created tables and compare final output path.
- Inspect loaded schema and parsed sample event rows.
- Inspect column types and compare sum results before and after casting.
Explanation
Correct Answer
D:The needed observation is: Inspect column types and compare sum results before and after casting. The suspected failure is: Path-based reads need explicit schema or casting for reliable numeric operations. The repair should only follow that check.
Incorrect Answers
A:Measure bytes, scan time and CPU for equal query workloads on both outputs. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect column types and compare sum results before and after casting.
B:Inspect catalog for newly created tables and compare final output path. That does not establish whether the stated cause is present: Path-based reads need explicit schema or casting for reliable numeric operations. The diagnostic is: Inspect column types and compare sum results before and after casting.
C:Inspect loaded schema and parsed sample event rows. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect column types and compare sum results before and after casting.
Question 279
At Rosehill Diagnostics, when validating a daily batch (fictional study case R280-C056-2), a SQL analyst queries external CSV files without a declared schema and sees all measures as strings. 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.
- Chosen compression meets storage and latency objectives with unchanged rows.
- Required files exist without unexpected catalog objects.
- Host and severity are correctly derived from line content and queryable.
- Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
Explanation
Correct Answer
D:The verification result must be: Numeric aggregates compute accurately and invalid numeric rows are handled deliberately. It is stronger evidence than merely performing: Inspect column types and compare sum results before and after casting.
Incorrect Answers
A:Chosen compression meets storage and latency objectives with unchanged rows. Implementation or a check alone is not proof of success. The measurable end state is: Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
B:Required files exist without unexpected catalog objects. This is not the observed recovery outcome. Acceptance requires: Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
C:Host and severity are correctly derived from line content and queryable. This is not the observed recovery outcome. Acceptance requires: Numeric aggregates compute accurately and invalid numeric rows are handled deliberately.
Question 280
At Redwood Transit, when reviewing an incremental load (fictional study case R280-C056-1), a SQL analyst queries external CSV files without a declared schema and sees all measures as strings. 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 only the CSV source schema and dependent queries.
- Apply the codec to the evaluated ORC dataset only.
- Limit the change to the export sink and metadata cleanup if authorized.
- Add parsing only to the affected text feed.
Explanation
Correct Answer
A:Keep the intervention within this boundary: Correct only the CSV source schema and dependent queries. The reported failure mechanism is: Path-based reads need explicit schema or casting for reliable numeric operations.
Incorrect Answers
B:Apply the codec to the evaluated ORC dataset only. The action does not preserve the identified scope boundary: Correct only the CSV source schema and dependent queries.
C:Limit the change to the export sink and metadata cleanup if authorized. It is not the bounded choice for the stated condition: A SQL analyst queries external CSV files without a declared schema and sees all measures as strings. The permitted change must remain: Correct only the CSV source schema and dependent queries.
D:Add parsing only to the affected text feed. It is not the bounded choice for the stated condition: A SQL analyst queries external CSV files without a declared schema and sees all measures as strings. The permitted change must remain: Correct only the CSV source schema and dependent queries.