Certified Associate Developer for Apache Spark Practice Test 30
Question 290
At Granite Insurance, when reviewing an incremental load (fictional study case R280-C058-1), a pipeline writes files with `saveAsTable()` and unexpectedly creates catalog metadata not approved by governance. 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 parsing only to the affected text feed.
- Limit the change to the export sink and metadata cleanup if authorized.
- Move or correct only the mixed output location under change control.
- Register or address only that ORC data source.
Explanation
Correct Answer
B:The approved limit is: Limit the change to the export sink and metadata cleanup if authorized. It avoids applying the corrective step beyond the stated failure: A pipeline writes files with `saveAsTable()` and unexpectedly creates catalog metadata not approved by governance.
Incorrect Answers
A:Add parsing only to the affected text feed. It is not the bounded choice for the stated condition: A pipeline writes files with `saveAsTable()` and unexpectedly creates catalog metadata not approved by governance. The permitted change must remain: Limit the change to the export sink and metadata cleanup if authorized.
C:Move or correct only the mixed output location under change control. The action does not preserve the identified scope boundary: Limit the change to the export sink and metadata cleanup if authorized.
D:Register or address only that ORC data source. This does not enforce the required scope: Limit the change to the export sink and metadata cleanup if authorized. The specific failure is: `saveAsTable` creates or writes a table relation, whereas the requirement was only an external file output.
Question 291
At Elmwood Manufacturing, while reconciling a reporting dataset (fictional study case R280-C059-1), a log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. 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.
- Separate Delta and ordinary Parquet destinations and read each with its own supported format.
- Create a DataFrame and temp view for the ORC path or use a supported direct-file SQL syntax.
- Extract fields with documented parsing expressions before SQL filters reference them.
- Read the table with the Delta-aware source or managed table API where supported.
Explanation
Correct Answer
C:A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The underlying cause is: Text sources expose raw line value unless parsing derives structured columns. The corrective step is: Extract fields with documented parsing expressions before SQL filters reference them. Validate the outcome: Host and severity are correctly derived from line content and queryable.
Incorrect Answers
A:Separate Delta and ordinary Parquet destinations and read each with its own supported format. The option targets a different stage or condition. The relevant failure is: Text sources expose raw line value unless parsing derives structured columns. The needed repair is: Extract fields with documented parsing expressions before SQL filters reference them.
B:Create a DataFrame and temp view for the ORC path or use a supported direct-file SQL syntax. The option targets a different stage or condition. The relevant failure is: Text sources expose raw line value unless parsing derives structured columns. The needed repair is: Extract fields with documented parsing expressions before SQL filters reference them.
D:Read the table with the Delta-aware source or managed table API where supported. The option targets a different stage or condition. The relevant failure is: Text sources expose raw line value unless parsing derives structured columns. The needed repair is: Extract fields with documented parsing expressions before SQL filters reference them.
Question 292
At Lakeside Devices, during a pipeline migration (fictional study case R280-C059-2), a log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. 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.
- Text sources expose raw line value unless parsing derives structured columns.
- Distinct table formats were placed in a shared physical location.
- The path was never loaded or referenced using a supported SQL data-source form.
- Direct Parquet reading bypasses Delta transaction-log snapshot semantics.
Explanation
Correct Answer
A:Text sources expose raw line value unless parsing derives structured columns. This accounts for the observed condition: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The relevant verification is: Inspect loaded schema and parsed sample event rows.
Incorrect Answers
B:Distinct table formats were placed in a shared physical location. This is not the root cause established for the reported condition: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The cause is: Text sources expose raw line value unless parsing derives structured columns.
C:The path was never loaded or referenced using a supported SQL data-source form. This is not the root cause established for the reported condition: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The cause is: Text sources expose raw line value unless parsing derives structured columns.
D:Direct Parquet reading bypasses Delta transaction-log snapshot semantics. The observed failure instead follows from: Text sources expose raw line value unless parsing derives structured columns. The alternative does not explain the same dependency.
Question 293
At Bayfront Markets, after a Spark runtime upgrade (fictional study case R280-C059-1), a log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. 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 the presence of `_delta_log` and unrelated file layout within the path.
- Inspect loaded schema and parsed sample event rows.
- Inspect session catalog entries and the actual file format/path.
- Compare Delta log version and rows from the correct Delta reader versus raw Parquet listing.
Explanation
Correct Answer
B:Inspect loaded schema and parsed sample event rows. This gathers evidence about the stated mechanism: Text sources expose raw line value unless parsing derives structured columns. The existing symptom is: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns.
Incorrect Answers
A:Inspect the presence of `_delta_log` and unrelated file layout within the path. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect loaded schema and parsed sample event rows.
C:Inspect session catalog entries and the actual file format/path. That does not establish whether the stated cause is present: Text sources expose raw line value unless parsing derives structured columns. The diagnostic is: Inspect loaded schema and parsed sample event rows.
D:Compare Delta log version and rows from the correct Delta reader versus raw Parquet listing. That does not establish whether the stated cause is present: Text sources expose raw line value unless parsing derives structured columns. The diagnostic is: Inspect loaded schema and parsed sample event rows.
Question 294
At Orion Fintech, when validating a daily batch (fictional study case R280-C059-2), a log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. 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.
- Host and severity are correctly derived from line content and queryable.
- Both datasets have reproducible reads under correct format semantics.
- The SQL query returns expected ORC rows under the intended schema.
- The query returns the committed Delta snapshot with correct rows.
Explanation
Correct Answer
A:A passing check shows: Host and severity are correctly derived from line content and queryable. This is evidence for the scoped change: Extract fields with documented parsing expressions before SQL filters reference them.
Incorrect Answers
B:Both datasets have reproducible reads under correct format semantics. The alternative cannot demonstrate that the issue has been corrected: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The required result is: Host and severity are correctly derived from line content and queryable.
C:The SQL query returns expected ORC rows under the intended schema. Implementation or a check alone is not proof of success. The measurable end state is: Host and severity are correctly derived from line content and queryable.
D:The query returns the committed Delta snapshot with correct rows. Implementation or a check alone is not proof of success. The measurable end state is: Host and severity are correctly derived from line content and queryable.
Question 295
At Westfield Insights, when reviewing an incremental load (fictional study case R280-C059-1), a log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. 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.
- Move or correct only the mixed output location under change control.
- Register or address only that ORC data source.
- Add parsing only to the affected text feed.
- Change only the Delta dataset reader, not unrelated Parquet sources.
Explanation
Correct Answer
C:The approved limit is: Add parsing only to the affected text feed. It avoids applying the corrective step beyond the stated failure: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns.
Incorrect Answers
A:Move or correct only the mixed output location under change control. The action does not preserve the identified scope boundary: Add parsing only to the affected text feed.
B:Register or address only that ORC data source. It is not the bounded choice for the stated condition: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The permitted change must remain: Add parsing only to the affected text feed.
D:Change only the Delta dataset reader, not unrelated Parquet sources. It is not the bounded choice for the stated condition: A log-processing SQL query references `host` and `severity` after reading raw text lines, and Spark reports unresolved columns. The permitted change must remain: Add parsing only to the affected text feed.
Question 296
At Mapleford Engineering, while reconciling a reporting dataset (fictional study case R280-C060-1), a load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. 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.
- Create a DataFrame and temp view for the ORC path or use a supported direct-file SQL syntax.
- Read the table with the Delta-aware source or managed table API where supported.
- Separate Delta and ordinary Parquet destinations and read each with its own supported format.
- Use `mode('append')` after validating schema and deduplication requirements for the target.
Explanation
Correct Answer
C:The failure mechanism is: Distinct table formats were placed in a shared physical location. Apply the bounded change: Separate Delta and ordinary Parquet destinations and read each with its own supported format. The acceptance test must show: Both datasets have reproducible reads under correct format semantics.
Incorrect Answers
A:Create a DataFrame and temp view for the ORC path or use a supported direct-file SQL syntax. The option targets a different stage or condition. The relevant failure is: Distinct table formats were placed in a shared physical location. The needed repair is: Separate Delta and ordinary Parquet destinations and read each with its own supported format.
B:Read the table with the Delta-aware source or managed table API where supported. The option targets a different stage or condition. The relevant failure is: Distinct table formats were placed in a shared physical location. The needed repair is: Separate Delta and ordinary Parquet destinations and read each with its own supported format.
D:Use `mode('append')` after validating schema and deduplication requirements for the target. That would not resolve the reported problem: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. The source-supported intervention is: Separate Delta and ordinary Parquet destinations and read each with its own supported format.
Question 297
At Horizon Logistics, during a pipeline migration (fictional study case R280-C060-2), a load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. 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 path was never loaded or referenced using a supported SQL data-source form.
- Distinct table formats were placed in a shared physical location.
- Direct Parquet reading bypasses Delta transaction-log snapshot semantics.
- The writer did not explicitly set a mode matching the approved incremental append use case.
Explanation
Correct Answer
B:The failure is explained by: Distinct table formats were placed in a shared physical location. A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. Correcting it would require: Separate Delta and ordinary Parquet destinations and read each with its own supported format.
Incorrect Answers
A:The path was never loaded or referenced using a supported SQL data-source form. The observed failure instead follows from: Distinct table formats were placed in a shared physical location. The alternative does not explain the same dependency.
C:Direct Parquet reading bypasses Delta transaction-log snapshot semantics. This is not the root cause established for the reported condition: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. The cause is: Distinct table formats were placed in a shared physical location.
D:The writer did not explicitly set a mode matching the approved incremental append use case. The observed failure instead follows from: Distinct table formats were placed in a shared physical location. The alternative does not explain the same dependency.
Question 298
At Aspen Public Services, after a Spark runtime upgrade (fictional study case R280-C060-1), a load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. 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 session catalog entries and the actual file format/path.
- Compare Delta log version and rows from the correct Delta reader versus raw Parquet listing.
- Inspect the presence of `_delta_log` and unrelated file layout within the path.
- Inspect path existence, mode and the intended incremental record keys.
Explanation
Correct Answer
C:Inspect the presence of `_delta_log` and unrelated file layout within the path. This gathers evidence about the stated mechanism: Distinct table formats were placed in a shared physical location. The existing symptom is: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format.
Incorrect Answers
A:Inspect session catalog entries and the actual file format/path. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect the presence of `_delta_log` and unrelated file layout within the path.
B:Compare Delta log version and rows from the correct Delta reader versus raw Parquet listing. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect the presence of `_delta_log` and unrelated file layout within the path.
D:Inspect path existence, mode and the intended incremental record keys. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect the presence of `_delta_log` and unrelated file layout within the path.
Question 299
At Juniper Foods, when validating a daily batch (fictional study case R280-C060-2), a load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. 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 SQL query returns expected ORC rows under the intended schema.
- Both datasets have reproducible reads under correct format semantics.
- The query returns the committed Delta snapshot with correct rows.
- Existing rows remain and new valid rows are added exactly once.
Explanation
Correct Answer
B:Both datasets have reproducible reads under correct format semantics. This demonstrates the intended effect of: Separate Delta and ordinary Parquet destinations and read each with its own supported format. The prior failure was: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format.
Incorrect Answers
A:The SQL query returns expected ORC rows under the intended schema. This is not the observed recovery outcome. Acceptance requires: Both datasets have reproducible reads under correct format semantics.
C:The query returns the committed Delta snapshot with correct rows. The alternative cannot demonstrate that the issue has been corrected: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. The required result is: Both datasets have reproducible reads under correct format semantics.
D:Existing rows remain and new valid rows are added exactly once. This is not the observed recovery outcome. Acceptance requires: Both datasets have reproducible reads under correct format semantics.
Question 300
At Silverpeak Bioinformatics, when reviewing an incremental load (fictional study case R280-C060-1), a load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. 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.
- Register or address only that ORC data source.
- Move or correct only the mixed output location under change control.
- Change only the Delta dataset reader, not unrelated Parquet sources.
- Append only into the approved output dataset.
Explanation
Correct Answer
B:Keep the intervention within this boundary: Move or correct only the mixed output location under change control. The reported failure mechanism is: Distinct table formats were placed in a shared physical location.
Incorrect Answers
A:Register or address only that ORC data source. This does not enforce the required scope: Move or correct only the mixed output location under change control. The specific failure is: Distinct table formats were placed in a shared physical location.
C:Change only the Delta dataset reader, not unrelated Parquet sources. It is not the bounded choice for the stated condition: A load path contains ordinary Parquet partitions and a Delta log, leading to undefined results when queried with one source format. The permitted change must remain: Move or correct only the mixed output location under change control.
D:Append only into the approved output dataset. This does not enforce the required scope: Move or correct only the mixed output location under change control. The specific failure is: Distinct table formats were placed in a shared physical location.