First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Data Collection and Web Acquisition
In a polite web-scraping pipeline, which HTTP status code signals that the client should slow down and retry after the period given in the Retry-After header?
- 204 No Content
- 429 Too Many Requests Correct answer.
- 301 Moved Permanently
- 404 Not Found
Explanation
A 429 status indicates the client has exceeded a rate limit imposed by the server, and the Retry-After header (or body) tells the client how long to wait before retrying. Respecting this signal is a core politeness and reliability practice in acquisition pipelines.
Question 2Data Collection and Web Acquisition
Which statement best describes the role of the robots.txt file in a compliant web acquisition workflow?
- It encrypts responses so only authorized crawlers can read them
- It provides the sitemap of every URL that must be downloaded
- It lists crawl directives that well-behaved clients should honor for the paths they cover Correct answer.
- It authenticates the crawler against the origin server
Explanation
robots.txt is a voluntary convention where a site publishes User-agent and Disallow/Allow rules describing which paths automated clients may fetch. Compliant crawlers parse it and avoid disallowed paths; it does not enforce anything technically.
Question 3Data Collection and Web Acquisition
A page renders its product list only after JavaScript executes. Which acquisition approach most directly retrieves the final rendered DOM?
- Reading the site's robots.txt and inferring the list
- Fetching the raw HTML with a plain HTTP client and parsing it
- Using a headless browser that executes scripts before extracting content Correct answer.
- Requesting the page with the HEAD method
Explanation
Client-side rendering means the initial HTML lacks the product data; a headless browser executes the JavaScript and exposes the resulting DOM. Plain HTTP clients only see the pre-render HTML, which typically contains a placeholder container.
Question 4Data Collection and Web Acquisition
What is the primary purpose of the User-Agent request header when acquiring web data?
- It specifies the character encoding of the response body
- It carries the session cookie for authentication
- It declares the compression algorithm for the response
- It identifies the client software to the server for logging and policy decisions Correct answer.
Explanation
The User-Agent string identifies the requesting client so servers can log traffic, serve tailored responses, or apply access policies. Many sites use it to distinguish browsers from bots and to decide whether to block or throttle.
Question 5Data Collection and Web Acquisition
Which data format is self-describing, uses keys and nested structures, and is the most common payload for modern public web APIs?
- CSV
- Fixed-width text
- Protocol Buffers
- JSON Correct answer.
Explanation
JSON encodes objects as key-value pairs with native support for nesting and arrays, and it is the de facto default for REST-style web APIs. Its self-describing structure makes it easy to parse without an external schema.
Question 6Data Collection and Web Acquisition
When paginating through a REST API that returns a 'next' cursor in each response, what is the correct acquisition strategy?
- Increment the page number until an error occurs
- Follow the cursor link until it is absent or null Correct answer.
- Request all pages in parallel using guessed offsets
- Stop after the first page and deduplicate
Explanation
Cursor-based pagination requires you to use the token or link the server returns to request the following page, stopping when no cursor is provided. Guessing offsets or page numbers may skip or duplicate records because the underlying data can shift.
Question 7Data Collection and Web Acquisition
Which HTML attribute most reliably holds the destination URL of a hyperlink to be followed during crawling?
- src
- alt
- action
- href Correct answer.
Explanation
The href attribute on an anchor element specifies the target URL that a crawler should enqueue. Link discovery typically extracts all anchor href values and resolves them against the base URL.
Question 8Data Collection and Web Acquisition
What does the HTTP Accept-Encoding header allow a client to declare?
- The languages it prefers for content
- The authentication scheme it supports
- The compression formats it can decode in the response Correct answer.
- The maximum response size it will accept
Explanation
Accept-Encoding lists content codings such as gzip or br that the client can decompress, enabling the server to compress responses and reduce transfer size. The client must then decode the body using the coding named in Content-Encoding.
Question 9Data Collection and Web Acquisition
A crawler must avoid overloading a small site. Which combination best implements politeness?
- Ignoring robots.txt to reduce request count
- High concurrency with no delay and aggressive retries
- Randomizing User-Agent strings on every request
- A per-host delay plus honoring Retry-After and limiting concurrency Correct answer.
Explanation
Politeness combines rate limiting per host, respecting server-provided backoff signals like Retry-After, and capping concurrent connections. These measures keep request load predictable and reduce the risk of being blocked or harming the target.
Question 10Data Collection and Web Acquisition
When extracting data from HTML, why is it risky to rely on absolute XPath expressions tied to full document position?
- Absolute XPath cannot select text nodes
- XPath is not supported by HTML parsers
- Minor layout changes shift positions and break the selector Correct answer.
- Absolute XPath ignores attribute values entirely
Explanation
Absolute paths encode the exact nesting depth and sibling order, so any inserted wrapper or reordered element invalidates them. Resilient scrapers prefer stable attributes, semantic classes, or relative paths anchored on identifiers.
Question 11Data Collection and Web Acquisition
An API returns data split across pages using an offset and limit. What symptom most likely indicates you are paginating incorrectly while the underlying dataset changes?
- Duplicate or skipped records across pages Correct answer.
- Consistent total record counts
- Faster response times on later pages
- Stable ETag values
Explanation
Offset pagination over a mutating dataset can shift rows between requests, causing records to appear twice or be missed. Cursor-based pagination or snapshot parameters reduce this risk by anchoring the position to a stable marker.
Question 12Data Collection and Web Acquisition
Which technique best handles a login-gated dataset where the site issues a session cookie after form submission?
- Submit credentials, capture the session cookie, and reuse it on subsequent requests Correct answer.
- Disable cookies and rely on the User-Agent header
- Parse the login page HTML and assume access is granted
- Request the data pages with the HEAD method
Explanation
Authenticated acquisition requires completing the login flow, storing the resulting session cookie, and sending it with later requests. The cookie proves the authenticated session; without it, protected endpoints return redirects or errors.
Question 13Data Collection and Web Acquisition
What is the main advantage of using CSS selectors over regex for extracting structured fields from HTML?
- CSS selectors operate on the parsed document tree and are robust to formatting Correct answer.
- CSS selectors run faster than any parser
- CSS selectors do not require a document object model
- CSS selectors can modify the HTML before extraction
Explanation
CSS selectors query the parsed DOM, so whitespace, attribute order, and formatting differences do not break matching. Regex over raw markup is brittle because it ignores document structure and can match unintended text.
Question 14Data Collection and Web Acquisition
A site returns a 200 status but the body is a CAPTCHA challenge page. What is the most appropriate interpretation?
- The data is compressed and must be decoded
- The request succeeded and the CAPTCHA text is the target data
- The server is down and will recover automatically
- The acquisition was blocked and the pipeline should not treat the page as valid data Correct answer.
Explanation
Anti-bot systems often serve challenge pages with a 200 status to confuse naive scrapers. The pipeline should detect such interstitials via content checks and treat them as failures rather than parsing them as data.
Question 15Data Collection and Web Acquisition
Which factor most affects whether a crawler should honor a site's Crawl-delay directive?
- The response body size
- The number of URLs in your seed list
- The crawler's own hardware speed
- The site's stated request-rate policy and your compliance obligations Correct answer.
Explanation
Crawl-delay expresses the site owner's request-rate preference, and honoring it is part of compliant, polite acquisition. Your own capacity or seed size does not override the site's stated policy.
Question 16Data Collection and Web Acquisition
When normalizing extracted dates from multiple sources, which approach best supports reliable downstream analysis?
- Keep only the year and month
- Convert to a single canonical format such as ISO 8601 with an explicit timezone Correct answer.
- Store dates as locale-specific free text
- Store the raw string and let each consumer parse it
Explanation
Converting to ISO 8601 with an explicit timezone yields unambiguous, sortable values that compare correctly across sources. Leaving raw or partial strings pushes parsing ambiguity downstream and risks inconsistent results.
Question 17Data Collection and Web Acquisition
Which HTTP method is conventionally used to retrieve a resource without side effects and is therefore preferred for data acquisition requests?
- GET Correct answer.
- POST
- PATCH
- DELETE
Explanation
GET is defined as safe and idempotent, meaning it should not change server state, which makes it suitable for repeated data retrieval. POST, PATCH, and DELETE are intended to create or modify state.
Question 18Data Collection and Web Acquisition
A scraper needs to extract a table where headers are in the first row and values span multiple rows due to rowspan. What is the most robust strategy?
- Ignore headers and export rows positionally
- Expand rowspan and colspan into a full grid before mapping headers to values Correct answer.
- Use the first cell of each row as the key
- Assume each row has the same number of cells and zip headers directly
Explanation
Rowspan and colspan mean raw rows do not align one-to-one with headers, so the table must be expanded into a full grid first. Mapping headers to the expanded grid preserves correct column associations.
Question 19Data Collection and Web Acquisition
Why should a web acquisition pipeline store a hash of each fetched document alongside its content?
- To decode the response encoding
- To compress the document for storage
- To authenticate the origin server
- To detect duplicates and changes across crawl runs Correct answer.
Explanation
A content hash lets the pipeline recognize identical documents fetched from different URLs or unchanged pages on later runs. This supports deduplication and incremental updates without re-processing everything.
Question 20Data Collection and Web Acquisition
What distinguishes a sitemap.xml from robots.txt in a crawling workflow?
- Sitemaps are required; robots.txt is optional
- Sitemaps enforce authentication; robots.txt encrypts traffic
- Sitemaps block bad bots; robots.txt lists all pages
- Sitemaps list URLs to discover; robots.txt states crawl permissions Correct answer.
Explanation
A sitemap enumerates URLs the site wants discovered, while robots.txt communicates which paths automated clients may fetch. They serve complementary discovery and permission roles, and both are conventions rather than enforcement.
Question 21Data Collection and Web Acquisition
A pipeline fetches pages and finds that some responses have Content-Type 'text/html; charset=ISO-8859-1' while others use UTF-8. What is the correct handling?
- Decode all bodies as UTF-8 regardless of header
- Decode each body using the charset declared in its Content-Type or meta tag Correct answer.
- Ignore the charset and store raw bytes as text
- Strip non-ASCII characters before parsing
Explanation
The charset parameter declares how bytes map to characters, and misdecoding produces mojibake or lost characters. The pipeline must decode each document with its declared encoding, falling back to detection only when none is given.
Question 22Data Collection and Web Acquisition
Which scenario best justifies using an official API instead of scraping HTML?
- The API has a strict rate limit
- The HTML contains many nested tables
- The HTML page is rendered with JavaScript
- The API requires a paid key but returns stable structured fields Correct answer.
Explanation
An official API with a documented schema provides stable, structured data and a contractual interface, reducing maintenance compared with parsing HTML that can change without notice. Cost and rate limits are trade-offs but do not negate the stability benefit.
Question 23Data Collection and Web Acquisition
A crawler uses a Bloom filter to track visited URLs. What is the key trade-off it accepts?
- It requires storing every URL in plaintext
- It may report false positives, causing some unvisited URLs to be skipped Correct answer.
- It guarantees exact membership but uses more memory
- It cannot handle large URL sets
Explanation
A Bloom filter uses compact probabilistic storage but can yield false positives, meaning a URL might be treated as visited when it was not. This can cause some pages to be skipped, a trade-off accepted for memory savings.
Question 24Data Collection and Web Acquisition
When a target site uses an infinite-scroll pattern, which acquisition strategy is most reliable?
- Fetch the initial HTML and assume all items are present
- Trigger scroll or pagination events in a headless browser and capture network responses Correct answer.
- Disable JavaScript to reveal all items
- Increase the timeout on a single request
Explanation
Infinite scroll loads items via asynchronous requests as the user scrolls, so a headless browser can trigger scrolling and capture the underlying network responses. This yields the full item set rather than only the initially rendered batch.
Question 25Data Collection and Web Acquisition
A pipeline must merge records from two sources where one uses 'user_id' and the other uses 'uid' for the same entity. What is the correct data-collection step?
- Drop records lacking the other field
- Define a schema mapping that normalizes field names before merging Correct answer.
- Store both datasets separately and never join them
- Concatenate the datasets and let analysts resolve conflicts
Explanation
A schema mapping reconciles differing field names into a shared canonical model before merging, ensuring records join correctly. Without normalization, joins silently fail or produce mismatched entities.
Question 26Data Collection and Web Acquisition
A crawler needs to fetch a large set of product pages from one host. Which HTTP status code should the crawler treat as a signal to slow down and retry later rather than as a permanent failure?
- 410 Gone
- 301 Moved Permanently
- 429 Too Many Requests Correct answer.
- 404 Not Found
Explanation
429 Too Many Requests indicates the client has exceeded a rate limit and should back off and retry, often respecting a Retry-After header. 404 and 410 describe missing or removed resources, and 301 is a permanent redirect, so none of them signal rate limiting.
Question 27Data Collection and Web Acquisition
A data engineer stores each fetched response together with the exact bytes received and later re-parses them. Which property does this most directly preserve for the acquisition pipeline?
- Reproducibility of extraction without refetching the source Correct answer.
- Automatic deduplication across crawl runs
- Compliance with the site's robots.txt rules
- Guaranteed freshness of the parsed records
Explanation
Keeping raw response bytes lets the pipeline re-run parsing and extraction logic without contacting the source again, which supports reproducibility and debugging. It does not by itself make records fresh, deduplicate URLs, or enforce robots.txt compliance, since those are separate pipeline concerns.
Question 28Data Collection and Web Acquisition
A crawler must resolve relative links found in an HTML document. Which element provides the base against which those relative URLs should be resolved?
- The base element in the document head, when present Correct answer.
- The Content-Length header of the response
- The first anchor element encountered in the body
- The user-agent string sent in the request
Explanation
HTML defines a base element that, when present, supplies the document base URL used to resolve relative references. If absent, the retrieval URL of the document acts as the base. Anchors, Content-Length, and user-agent values play no role in URL resolution.
Question 29Data Collection and Web Acquisition
A team must acquire a dataset that a provider exposes through a documented JSON API with authentication keys and rate limits. Which acquisition approach should the team choose first?
- Mirror the provider's site with a recursive wget command
- Call the documented API endpoints and honor its rate limits Correct answer.
- Download the provider's sitemap and crawl every listed page
- Scrape the provider's HTML pages with a headless browser
Explanation
A documented API with authentication and rate limits is the intended, stable interface for programmatic access and typically returns structured data directly. Scraping HTML, sitemaps, or mirroring the site adds fragility and may violate terms when a sanctioned API exists.
Question 30Data Collection and Web Acquisition
A crawler processes a queue of URLs and must avoid fetching the same URL twice, including when the same page is reachable through differently ordered query parameters. Which step best addresses this before deduplication?
- Strip the scheme and host and keep only the path
- Canonicalize URLs by sorting query parameters and normalizing case and default ports Correct answer.
- Append a random token to each URL to make it unique
- Hash the raw URL string exactly as found in each anchor
Explanation
URL canonicalization normalizes equivalent forms, such as parameter order, case, and default ports, so that duplicates collapse to one key before hashing or queueing. Hashing raw strings treats equivalent URLs as distinct, and stripping scheme and host destroys information needed to fetch the resource.
Question 31Data Collection and Web Acquisition
A scraper receives a response with Content-Type 'text/html' but no charset parameter, and the body contains non-ASCII characters that appear garbled. What is the most reliable next step?
- Inspect the document's meta charset declaration and apply encoding detection before decoding Correct answer.
- Re-request the page with the Accept-Language header set to English
- Assume UTF-8 and discard any bytes that fail to decode
- Decode the body as ASCII and replace unmappable characters with question marks
Explanation
When the HTTP header omits a charset, HTML rules direct parsers to consult an in-document meta charset declaration, with encoding detection as a fallback. Blindly assuming UTF-8 or ASCII can corrupt or drop characters, and Accept-Language affects content negotiation, not byte decoding.
Question 32Data Collection and Web Acquisition
During extraction, a scraper must pull a numeric price from a page whose markup changes layout frequently but always places the price inside an element with a stable data-price attribute. Which locator strategy is most robust?
- Select the element by its data-price attribute Correct answer.
- Select the element by the background color applied to it
- Select the element by its ordinal position among sibling divs
- Select the element by its absolute position in the DOM tree
Explanation
A stable semantic attribute such as data-price survives layout and styling changes, so attribute-based selection is resilient. Position-based and sibling-index locators break when markup is reordered, and visual styling is not a reliable data contract.
Question 33Data Collection and Web Acquisition
A crawler is configured to fetch pages from a host, but the site returns a robots.txt that disallows the target path for all user agents. What is the appropriate behavior for a well-behaved crawler?
- Fetch the path but slow the request rate to one per minute
- Fetch the path anyway because robots.txt is not legally binding
- Skip the disallowed path and seek an alternative permitted source or permission Correct answer.
- Fetch only the first byte of each disallowed page to test access
Explanation
robots.txt expresses the site owner's crawling preferences, and a well-behaved crawler respects disallowed paths, looking for permitted alternatives or explicit permission. Fetching anyway, slowing down, or probing partial content all still access disallowed resources.
Question 34Data Collection and Web Acquisition
A pipeline needs to extract all rows from an HTML table where each data row begins with a th element used as a row header and the remaining cells are td elements. Which extraction approach correctly pairs headers with values?
- Read the table's caption element and use it as the sole data source
- Concatenate all cell text in document order and split on whitespace
- Iterate rows, treat the first cell as the row label, and map remaining cells to column headers from the header row Correct answer.
- Extract only td elements and ignore th elements entirely
Explanation
Correct table extraction distinguishes header rows and row headers from data cells, then maps each data cell to its column header while retaining the row label. Concatenating text or ignoring th elements loses the structural pairing needed for reliable records.
Question 35Data Collection and Web Acquisition
A crawler wants to prioritize which URLs to fetch first when the crawl budget is limited. Which signal is most useful for estimating that a URL leads to valuable content?
- The length of the URL string in characters
- The HTTP version used by the server hosting the URL
- The order in which the URL appeared in the seed list
- The number and quality of inbound links pointing to the URL Correct answer.
Explanation
Link-based signals approximate importance because pages linked from many reputable sources tend to matter more, which is why crawl prioritization commonly uses inbound link counts and quality. URL length, HTTP version, and arbitrary seed order are weak or irrelevant proxies for content value.
Question 36Data Collection and Web Acquisition
A team runs two extractors over the same archived HTML: one parses with a lenient HTML parser and one with a strict XML parser. The strict parser fails on many pages. What is the most accurate interpretation?
- The archived bytes were corrupted during storage
- The strict parser is misconfigured to reject valid HTML
- The pages contain malformed or non-XML HTML that a lenient HTML parser tolerates Correct answer.
- The pages were served with the wrong Content-Type header
Explanation
Real-world HTML frequently violates XML well-formedness, such as unclosed tags, so strict XML parsers reject documents that lenient HTML parsers recover from. This is expected parser behavior, not evidence of storage corruption or a header problem.
Question 37Data Collection and Web Acquisition
A crawler must fetch pages from a host that serves content over both HTTP and HTTPS, and the HTTP version redirects to HTTPS. To avoid duplicate fetches, which configuration is best?
- Fetch both HTTP and HTTPS versions and store both as separate documents
- Canonicalize to the HTTPS form and treat the HTTP redirect as the same resource Correct answer.
- Prefer HTTP because it avoids TLS handshake overhead
- Disable redirect following so the HTTP version is stored as-is
Explanation
Canonicalizing to the final HTTPS URL collapses the redirect chain into one identity, preventing the same content from being stored twice. Fetching both schemes, disabling redirects, or preferring HTTP all create duplicates or store redirect stubs instead of content.
Question 38Data Collection and Web Acquisition
A pipeline acquires records from a source that paginates with a cursor, and the cursor occasionally repeats because of a server-side bug. Which safeguard best prevents an infinite acquisition loop?
- Track seen cursor values and stop when a cursor repeats Correct answer.
- Switch to fetching pages in random order
- Disable retries so failed pages are skipped
- Increase the page size until all records fit in one response
Explanation
Recording previously seen cursor values and halting on repetition bounds the loop even when the server returns a stale cursor. Larger page sizes, random ordering, and disabling retries do not detect the repeating cursor and may worsen the problem.
Question 39Data Collection and Web Acquisition
A crawler distributes fetches across many worker processes that share a visited-URL set stored in a single relational database. Throughput collapses as the set grows. Which change most directly addresses the bottleneck?
- Reduce the number of seed URLs in the initial queue
- Increase the page size requested from each target site
- Add more worker processes while keeping the same database
- Move the visited set to a sharded or in-memory key-value store with fast membership checks Correct answer.
Explanation
The bottleneck is contention on a single relational store for high-frequency membership checks, so a sharded or in-memory key-value store with fast lookups removes that contention. Adding workers increases pressure on the same database, and page size or seed count do not fix the lookup bottleneck.
Question 40Data Collection and Web Acquisition
A pipeline must decide whether to re-fetch a page whose content rarely changes. It stores the last fetch time and a content hash. Which policy best balances freshness against load on the source?
- Never refetch a page once a hash has been stored
- Refetch only when the page's URL changes
- Schedule refetches with an adaptive interval that lengthens when the hash is unchanged and shortens when it changes Correct answer.
- Refetch every page on a fixed hourly schedule regardless of change history
Explanation
Adaptive scheduling uses observed change history, extending intervals for stable pages and shortening them for volatile ones, which balances freshness against request load. Fixed frequent refetching wastes capacity, never refetching risks stale data, and URL changes do not indicate content change.
Question 41Data Quality, Cleaning, and Validation
A data steward is defining validation rules for a customer table. Which constraint best enforces referential integrity between an orders table and the customers table?
- A default value on orders.customer_id
- A foreign key on orders.customer_id referencing customers.customer_id Correct answer.
- A check constraint limiting orders.amount to positive numbers
- A unique index on orders.order_id
Explanation
Referential integrity guarantees that every value in a child column matches an existing value in the parent key. A foreign key constraint on orders.customer_id referencing customers.customer_id is the mechanism that enforces this rule at the database level.
Question 42Data Quality, Cleaning, and Validation
During profiling, a column holds 4,000 rows and exactly 250 distinct non-null values. What is the approximate cardinality ratio commonly reported for that column?
- 0.0625 Correct answer.
- 16.0000
- 0.9400
- 0.2500
Explanation
Cardinality ratio is the count of distinct values divided by the total row count. Here 250 divided by 4,000 equals 0.0625, indicating a low-cardinality column relative to its size.
Question 43Data Quality, Cleaning, and Validation
A quality team classifies defects by dimension. A customer record lists an age of 212 years. Which data quality dimension is primarily violated?
- Uniqueness
- Accuracy
- Validity Correct answer.
- Completeness
Explanation
Validity concerns conformance to a defined domain or business rule, such as an age falling within a plausible range. An age of 212 fails that range rule even though the field is populated and syntactically numeric.
Question 44Data Quality, Cleaning, and Validation
A pipeline ingests dates formatted as MM/DD/YYYY from one source and DD/MM/YYYY from another. Which cleansing action most directly resolves the ambiguity before loading?
- Impute the missing dates with the current date
- Drop all rows containing a date
- Hash the date column to anonymize it
- Apply a standard date-parsing rule per source and store as ISO 8601 Correct answer.
Explanation
Ambiguous formats should be resolved at the source level by parsing according to each source's known convention. Storing the result in ISO 8601 gives one unambiguous canonical representation downstream.
Question 45Data Quality, Cleaning, and Validation
Which technique is most appropriate for detecting outliers in a numeric column that is heavily skewed and non-normal?
- Z-score threshold of 0.5
- Assuming a normal distribution and trimming the top 1 percent
- Mean plus or minus one standard deviation
- Interquartile range rule using the 1.5 x IQR fences Correct answer.
Explanation
The IQR method uses quartiles and is robust to skew because it does not assume normality. It flags values beyond 1.5 times the interquartile range from the quartiles, which suits non-normal distributions.
Question 46Data Quality, Cleaning, and Validation
A validation rule states that a postal code must match a country-specific pattern. What type of validation is this?
- Format validation Correct answer.
- Referential validation
- Range validation
- Consistency validation
Explanation
Format validation checks that a value conforms to a defined syntactic pattern, such as a postal code mask for a given country. It does not test whether the value exists in a reference list or falls in a numeric range.
Question 47Data Quality, Cleaning, and Validation
A team wants to catch records that violate a required-field rule before they reach the warehouse. Where should this check ideally be enforced in a layered architecture?
- Only in the final reporting layer
- In ad hoc analyst queries after load
- Only after aggregation into summary tables
- At the earliest ingestion or staging boundary Correct answer.
Explanation
Enforcing required-field rules at ingestion prevents defective records from propagating downstream. Catching defects early reduces rework and the cost of correction across later layers.
Question 48Data Quality, Cleaning, and Validation
A column contains the values 'NY', 'New York', 'ny', and 'N.Y.' representing one state. Which cleansing step unifies them into a single representation?
- Deduplication of identical rows
- Nulling out inconsistent values
- Encryption of the column
- Standardization to a controlled code such as 'NY' Correct answer.
Explanation
Standardization maps variant representations to a single controlled vocabulary or code. Here all four variants map to the canonical state code 'NY', enabling reliable grouping and joins.
Question 49Data Quality, Cleaning, and Validation
A data engineer finds that a join between a fact table and a dimension produces more rows than the fact table contains. Which data quality issue is the most likely cause?
- A missing index on the join column
- Duplicate keys in the dimension table Correct answer.
- Null values in the fact measure
- Inconsistent date formats in the dimension
Explanation
Row multiplication in a join typically results from non-unique keys on the dimension side, so each fact row matches several dimension rows. Enforcing uniqueness on the dimension key prevents this fan-out.
Question 50Data Quality, Cleaning, and Validation
A validation test asserts that every value in a foreign key column exists in the parent table. Which test outcome category does a single orphaned key represent?
- A referential integrity failure Correct answer.
- A completeness failure
- A format failure
- A range failure
Explanation
An orphaned key is a child value with no matching parent, which is precisely a referential integrity failure. The test verifies that all child keys resolve to existing parent rows.