Certified Associate Developer for Apache Spark Practice Test 45
Question 440
At Northstar Payments, when reviewing an incremental load (fictional study case R280-C088-1), a data-cleaning job calls `dropna()` without a subset and removes customers whose optional middle name is absent. 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.
- Deduplicate only the overlapping event family.
- Validate only fields governed by the postal-code contract.
- Apply normalization only to the approved account key.
- Restrict validation to declared mandatory fields.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: A data-cleaning job calls `dropna()` without a subset and removes customers whose optional middle name is absent. The bounded intervention is: Restrict validation to declared mandatory fields. Confirm: Customers missing optional fields remain while required-field failures are excluded.
Incorrect Answers
A:Deduplicate only the overlapping event family. This does not enforce the required scope: Restrict validation to declared mandatory fields. The specific failure is: Default null-drop semantics consider all columns, including optional ones.
B:Validate only fields governed by the postal-code contract. This does not enforce the required scope: Restrict validation to declared mandatory fields. The specific failure is: Default null-drop semantics consider all columns, including optional ones.
C:Apply normalization only to the approved account key. The action does not preserve the identified scope boundary: Restrict validation to declared mandatory fields.
Question 441
At Cloudhaven Apps, while reconciling a reporting dataset (fictional study case R280-C089-1), two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. 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.
- Apply a schema-aware regex or range check and quarantine invalid rows.
- Normalize whitespace according to policy and deduplicate on the canonical ID.
- Union the feeds then deduplicate using documented event IDs and collision rules.
- Use `count('*')` or DataFrame `.count()` for total rows, and count nullable-field nonnulls separately.
Explanation
Correct Answer
C:The observed defect follows from: DataFrame union is multiset-style and does not automatically deduplicate. The appropriate correction is: Union the feeds then deduplicate using documented event IDs and collision rules. Confirm the result by verifying: Each logical event is counted once without losing unique events.
Incorrect Answers
A:Apply a schema-aware regex or range check and quarantine invalid rows. The option targets a different stage or condition. The relevant failure is: DataFrame union is multiset-style and does not automatically deduplicate. The needed repair is: Union the feeds then deduplicate using documented event IDs and collision rules.
B:Normalize whitespace according to policy and deduplicate on the canonical ID. The option targets a different stage or condition. The relevant failure is: DataFrame union is multiset-style and does not automatically deduplicate. The needed repair is: Union the feeds then deduplicate using documented event IDs and collision rules.
D:Use `count('*')` or DataFrame `.count()` for total rows, and count nullable-field nonnulls separately. The option targets a different stage or condition. The relevant failure is: DataFrame union is multiset-style and does not automatically deduplicate. The needed repair is: Union the feeds then deduplicate using documented event IDs and collision rules.
Question 442
At Bayshore Healthcare, during a pipeline migration (fictional study case R280-C089-2), two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. 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.
- DataFrame union is multiset-style and does not automatically deduplicate.
- Missing-data checks do not validate content format or allowed values.
- The business key was not normalized before deduplication.
- SQL aggregate count of a column ignores null values.
Explanation
Correct Answer
A:The reported symptom is: Two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. Its direct cause is: DataFrame union is multiset-style and does not automatically deduplicate. Test that conclusion using: Inspect event IDs that appear in both source batches.
Incorrect Answers
B:Missing-data checks do not validate content format or allowed values. That explanation needs evidence of another fault. The specific mechanism here is: DataFrame union is multiset-style and does not automatically deduplicate.
C:The business key was not normalized before deduplication. This is not the root cause established for the reported condition: Two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. The cause is: DataFrame union is multiset-style and does not automatically deduplicate.
D:SQL aggregate count of a column ignores null values. This is not the root cause established for the reported condition: Two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. The cause is: DataFrame union is multiset-style and does not automatically deduplicate.
Question 443
At Stonebridge Research, after a Spark runtime upgrade (fictional study case R280-C089-1), two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. 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.
- Count failures against positive and negative postal-code fixtures.
- Compare raw and trimmed keys for duplicate clusters.
- Inspect event IDs that appear in both source batches.
- Compare total rows with counts of the nullable note.
Explanation
Correct Answer
C:The needed observation is: Inspect event IDs that appear in both source batches. The suspected failure is: DataFrame union is multiset-style and does not automatically deduplicate. The repair should only follow that check.
Incorrect Answers
A:Count failures against positive and negative postal-code fixtures. That does not establish whether the stated cause is present: DataFrame union is multiset-style and does not automatically deduplicate. The diagnostic is: Inspect event IDs that appear in both source batches.
B:Compare raw and trimmed keys for duplicate clusters. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect event IDs that appear in both source batches.
D:Compare total rows with counts of the nullable note. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect event IDs that appear in both source batches.
Question 444
At Cedarline Telecommunications, when validating a daily batch (fictional study case R280-C089-2), two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. 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 codes are flagged while valid formats remain.
- One record per canonical account ID remains without merging unrelated IDs.
- Each logical event is counted once without losing unique events.
- Reconciliation reports the true row total and separate completeness metric.
Explanation
Correct Answer
C:A passing check shows: Each logical event is counted once without losing unique events. This is evidence for the scoped change: Union the feeds then deduplicate using documented event IDs and collision rules.
Incorrect Answers
A:Invalid codes are flagged while valid formats remain. Implementation or a check alone is not proof of success. The measurable end state is: Each logical event is counted once without losing unique events.
B:One record per canonical account ID remains without merging unrelated IDs. Implementation or a check alone is not proof of success. The measurable end state is: Each logical event is counted once without losing unique events.
D:Reconciliation reports the true row total and separate completeness metric. Implementation or a check alone is not proof of success. The measurable end state is: Each logical event is counted once without losing unique events.
Question 445
At Cobalt Analytics, when reviewing an incremental load (fictional study case R280-C089-1), two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. 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.
- Deduplicate only the overlapping event family.
- Validate only fields governed by the postal-code contract.
- Apply normalization only to the approved account key.
- Correct the counting metric without rewriting records.
Explanation
Correct Answer
A:Deduplicate only the overlapping event family. This limits the change while addressing: DataFrame union is multiset-style and does not automatically deduplicate. The expected outcome is: Each logical event is counted once without losing unique events.
Incorrect Answers
B:Validate only fields governed by the postal-code contract. This does not enforce the required scope: Deduplicate only the overlapping event family. The specific failure is: DataFrame union is multiset-style and does not automatically deduplicate.
C:Apply normalization only to the approved account key. It is not the bounded choice for the stated condition: Two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. The permitted change must remain: Deduplicate only the overlapping event family.
D:Correct the counting metric without rewriting records. It is not the bounded choice for the stated condition: Two daily feeds overlap and `union` includes exact repeated events, inflating activity totals. The permitted change must remain: Deduplicate only the overlapping event family.
Question 446
At Summit Supply, while reconciling a reporting dataset (fictional study case R280-C090-1), a validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. 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.
- Apply a schema-aware regex or range check and quarantine invalid rows.
- Normalize whitespace according to policy and deduplicate on the canonical ID.
- Use `count('*')` or DataFrame `.count()` for total rows, and count nullable-field nonnulls separately.
- Specify the documented business key subset and a deterministic survivorship rule for conflicting versions.
Explanation
Correct Answer
A:Apply a schema-aware regex or range check and quarantine invalid rows. The technical or governance gap is: Missing-data checks do not validate content format or allowed values. Check the affected state using: Count failures against positive and negative postal-code fixtures.
Incorrect Answers
B:Normalize whitespace according to policy and deduplicate on the canonical ID. The recorded mechanism is: Missing-data checks do not validate content format or allowed values. The proposed action does not correct that mechanism; use: Apply a schema-aware regex or range check and quarantine invalid rows.
C:Use `count('*')` or DataFrame `.count()` for total rows, and count nullable-field nonnulls separately. The recorded mechanism is: Missing-data checks do not validate content format or allowed values. The proposed action does not correct that mechanism; use: Apply a schema-aware regex or range check and quarantine invalid rows.
D:Specify the documented business key subset and a deterministic survivorship rule for conflicting versions. The option targets a different stage or condition. The relevant failure is: Missing-data checks do not validate content format or allowed values. The needed repair is: Apply a schema-aware regex or range check and quarantine invalid rows.
Question 447
At Granite Insurance, during a pipeline migration (fictional study case R280-C090-2), a validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. 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 business key was not normalized before deduplication.
- SQL aggregate count of a column ignores null values.
- Deduplication over every column treats differing ingestion metadata as unique records.
- Missing-data checks do not validate content format or allowed values.
Explanation
Correct Answer
D:The reported symptom is: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. Its direct cause is: Missing-data checks do not validate content format or allowed values. Test that conclusion using: Count failures against positive and negative postal-code fixtures.
Incorrect Answers
A:The business key was not normalized before deduplication. The observed failure instead follows from: Missing-data checks do not validate content format or allowed values. The alternative does not explain the same dependency.
B:SQL aggregate count of a column ignores null values. This is not the root cause established for the reported condition: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. The cause is: Missing-data checks do not validate content format or allowed values.
C:Deduplication over every column treats differing ingestion metadata as unique records. The observed failure instead follows from: Missing-data checks do not validate content format or allowed values. The alternative does not explain the same dependency.
Question 448
At Elmwood Manufacturing, after a Spark runtime upgrade (fictional study case R280-C090-1), a validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. 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 raw and trimmed keys for duplicate clusters.
- Compare total rows with counts of the nullable note.
- Compare duplicate order IDs with full-row equality and ordering metadata.
- Count failures against positive and negative postal-code fixtures.
Explanation
Correct Answer
D:Count failures against positive and negative postal-code fixtures. This gathers evidence about the stated mechanism: Missing-data checks do not validate content format or allowed values. The existing symptom is: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field.
Incorrect Answers
A:Compare raw and trimmed keys for duplicate clusters. The case requires a discriminating check before any change, not the offered alternative. Use: Count failures against positive and negative postal-code fixtures.
B:Compare total rows with counts of the nullable note. The case requires a discriminating check before any change, not the offered alternative. Use: Count failures against positive and negative postal-code fixtures.
C:Compare duplicate order IDs with full-row equality and ordering metadata. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Count failures against positive and negative postal-code fixtures.
Question 449
At Lakeside Devices, when validating a daily batch (fictional study case R280-C090-2), a validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. 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.
- One record per canonical account ID remains without merging unrelated IDs.
- Invalid codes are flagged while valid formats remain.
- Reconciliation reports the true row total and separate completeness metric.
- One authorized record per business ID remains with traceable selection rules.
Explanation
Correct Answer
B:Invalid codes are flagged while valid formats remain. This demonstrates the intended effect of: Apply a schema-aware regex or range check and quarantine invalid rows. The prior failure was: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field.
Incorrect Answers
A:One record per canonical account ID remains without merging unrelated IDs. Implementation or a check alone is not proof of success. The measurable end state is: Invalid codes are flagged while valid formats remain.
C:Reconciliation reports the true row total and separate completeness metric. Implementation or a check alone is not proof of success. The measurable end state is: Invalid codes are flagged while valid formats remain.
D:One authorized record per business ID remains with traceable selection rules. This is not the observed recovery outcome. Acceptance requires: Invalid codes are flagged while valid formats remain.
Question 450
At Bayfront Markets, when reviewing an incremental load (fictional study case R280-C090-1), a validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. 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.
- Apply normalization only to the approved account key.
- Correct the counting metric without rewriting records.
- Deduplicate only the target order dataset.
- Validate only fields governed by the postal-code contract.
Explanation
Correct Answer
D:Keep the intervention within this boundary: Validate only fields governed by the postal-code contract. The reported failure mechanism is: Missing-data checks do not validate content format or allowed values.
Incorrect Answers
A:Apply normalization only to the approved account key. It is not the bounded choice for the stated condition: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. The permitted change must remain: Validate only fields governed by the postal-code contract.
B:Correct the counting metric without rewriting records. The action does not preserve the identified scope boundary: Validate only fields governed by the postal-code contract.
C:Deduplicate only the target order dataset. It is not the bounded choice for the stated condition: A validation condition checks only null values but allows alphanumeric postal codes for a numeric-only field. The permitted change must remain: Validate only fields governed by the postal-code contract.