16. Practice Exercises with Answer Hints
16.9 Module 10: Power Query
Build a repeatable path from incoming files to reviewed output
A teammate receives one order Table, several monthly files and a store directory. They could manually copy and edit each new delivery. Power Query lets them record the input connection and transformations as repeatable steps. That does not establish that the newest file and every required row were actually loaded. Check row shape, types, key coverage and amounts after each exercise.
Use the ten-order Module 3 sample for the first task, the included three-file fixture for append and merge, and separate compact inputs for unpivot and date parsing. All rows and lookup keys are fictional. Use a local practice folder you own and an Excel build with the relevant Power Query tools. Connector coverage can differ by app and platform. Manual reconciliation or an equivalent supported route can still show the expected results.
Check the loaded result alongside the raw input. Name which row and type should change, which should stay the same and which should remain in review.
Keep a query, a source Table and a loaded Table distinct
- The source can be an Excel Table, a local folder of practice files or another supported connector. Preserve a stable original copy.
- The query describes how to transform, append or merge that source. An Applied Step is a statement about the intended operation.
- The editor preview helps inspect the operation. Verify the rows, dates and sums in the actual loaded result the report uses.
- Give the output a distinguishable name such as Orders_Clean. Avoid loading into the same Table you use as the input.
Create the controlled small files and worksheet inputs
Orders trim and type input
On a separate scratch worksheet use the ten original Orders rows as tblOrders. Set only a few City cells to their deliberately messy equivalents: BLK-1001 uses “ pune ” with normal outer spaces, BLK-1002 uses uppercase NASHIK, and AMN-1008 uses lower-case “sambhaji nagar”. Keep the amount and other recorded fields intact. These known variants should compile into the same City groups and original values when cleaned. Use a different clear name for the output data after loading.
January–March CSV files with one shared structure
Create three plain text files using the names below and save them as UTF-8 CSV in one dedicated local scratch folder. Their header row contains five identical column names. Dates use year-month-day text and Amount values are in whole rupees for this isolated exercise. Check the file extensions and preview after import. Keep the file name in or alongside the query result when available so you can reconcile each source separately.
Copy 2026-01.csv practice file
Order ID,Date,City,Store ID,Amount
Q-J01,2026-01-05,Pune,BLK-PUN-01,100
Q-J02,2026-01-29,Nashik,BLK-NSK-01,200Copy 2026-02.csv practice file
Order ID,Date,City,Store ID,Amount
Q-F01,2026-02-04,Nagpur,AMN-NGP-01,150
Q-F02,2026-02-10,Kolhapur,BLK-KOP-01,250Copy 2026-03.csv practice file
Order ID,Date,City,Store ID,Amount
Q-M01,2026-03-01,Solapur,AMN-SLP-01,175
Q-M02,2026-03-14,Sambhaji Nagar,BLK-SBN-01,225Keep the compatible folder clean of old exports, backups and other document structures. Folder connectors can enumerate files in subfolders as well. Inspect the actual list and filter to the intended names, path and type before combining. The expected result for these three files is six rows at ₹1,100, with January ₹300, February ₹400 and March ₹400.
Stores reference for the merge and the wide month exercise
Use the original seven-row tblStores from the lookup exercise. Make sure Store ID column stores text in both the folder result and the directory. To practise unpivot, copy the wide grid below into a separate input Table. This is a different practice source; its total need not match the folder files.
| City | Jan-2026 | Feb-2026 | Mar-2026 |
|---|---|---|---|
| Pune | 100 | 120 | 140 |
| Nashik | 200 | 220 | 240 |
Declared day-month-year date examples
Use a small scratch text field called Raw Date with 14-03-2026, 04-03-2026, 29-02-2027 and 31-12-2026. The declared input scheme is day-month-year. The third date is impossible and must remain in review. Use Text in the input until the intended date rule is applied.
Five original exercises · Try the operation, then verify its output
1 · Load tblOrders, trim and capitalize City, type Amount
Open the original Table through a supported From Table/Range action. Add Trim and Capitalize Each Word for City and change Amount to Decimal Number. Load the reviewed result to another sheet and compare types, groups and row count.
Hint for exercise 1
Use Transform text formatting for the City field and an explicit numeric type for Amount. Inspect any earlier automatic Changed Type step.
Worked answer for exercise 1
Expect Pune, Nashik and Sambhaji Nagar from the three seeded examples. The loaded result has ten rows and six city names, with total ₹2,870 and Pune ₹544. These casing changes are for known fixture labels. Other sources can need a verified alias map.
2 · Combine the three monthly files in one query
Use a supported Folder and combine transformation to stack January, February and March. Retain the input file name. Check header consistency and row count per included file rather than only the final grand total.
Hint for exercise 2
Inspect the folder listing, filter to the three controlled files and invoke Combine & Transform. Verify the sample-file transformation uses the common header and types.
Worked answer for exercise 2
Two rows arrive from each month. The loaded output contains six unique Order IDs and totals ₹1,100. The date periods and separate file totals are 300, 400 and 400. The optional separate imports and Append Queries control can achieve the same result when the folder feature is unavailable.
3 · Merge Orders and Stores to bring in City Manager
Use the six order rows with Store IDs as the left input. Use the seven-store directory as the right input. Join on Store ID, keep all order rows and expand the manager field after checking matched counts.
Hint for exercise 3
Use a Left Outer merge on the same displayed and typed column in both inputs. Check each order has exactly one expected match before expansion.
Worked answer for exercise 3
The six rows map in file order to Abhishek Shinde, Zoya, Amir, Rani, Salman and Raja. Count six and amount ₹1,100 still hold. A missing key gives an unresolved manager without requiring the order to be dropped from the left input.
4 · Unpivot city-by-month sales into City, Month and Sales
Preserve City as the identifier and turn the three month fields into labeled data rows. Check that the new sales values sum to the same known amount. Test the effect of a deliberately missing month cell in a scratch copy.
Hint for exercise 4
Select City and choose Unpivot Other Columns, or explicitly select the three month fields and unpivot just those columns. Rename the result attribute and value columns.
Worked answer for exercise 4
The two-city, three-month input becomes six city-month rows. Pune contributes ₹360 and Nashik ₹660, total ₹1,020. With a genuine null for Nashik February in the scratch query, only five contributing rows remain and known amount is ₹800. Preserve the missing observation separately.
5 · Load dd-mm-yyyy text dates under the declared convention
Apply a day-first conversion. Check a date whose first number is greater than twelve and one that is ambiguous in another locale. Verify an impossible date remains an error or null with a documented reason.
Hint for exercise 5
Use Change Type with Locale where it matches the known format, or Date.FromText with an explicit format. Keep a separate copy of Raw Date.
Worked answer for exercise 5
The valid examples yield 14 March 2026, 4 March 2026 and 31 December 2026. The 29 February 2027 string is invalid. Return a separate review outcome, and do not let an automatic locale step guess a different valid day or month.
Observe each Applied Step and verify the actual loaded shape
In Power Query Editor the Applied Steps list defines how the result is built. Inspect the earliest step that changes an unexpected row. Check that the City value starts with the source's actual spaces, then watch the intended trim and case operations. Next inspect the typed Amount values. Plain case formatting won't manage aliases such as Aurangabad; an explicit reference mapping is a different task.
On this fixture the title-case rule turns only known simple city variants into accepted labels. It would also change text that intentionally uses capital letters, such as a department abbreviation, if applied indiscriminately to another field. Select the intended City column and preserve ID, file origin and source labels that have their own meaning. A blank City requires a separate reviewed disposition; uppercasing or proper casing cannot supply a missing location. For a file that uses aliases or competing spellings, build an approved country or city map and verify its exact keys before accepting new output.
Choose types and check their effect
Power Query's Decimal Number and Fixed Decimal Number are distinct types. The former implements ordinary floating-point numbers, while the fixed type supports an explicitly bounded decimal precision. This small integer-valued input works for the original exercise with Decimal Number. A finance workbook can need a specified exact convention and later Excel calculation checks. A typed amount is still a unit-bearing field; preserve the rupee convention and reconcile the expected total.
Inspect any auto-added conversion. If a step type-converts your original text before using the declared locale, an ambiguous date might already have been misinterpreted. Set the correct type at the controlled step and preserve the initial text as needed. Read the preview for diagnostics and verify the output table directly after loading it to another sheet. A suitable output is ten rows and six canonical cities, with the existing raw Orders source still present.
Append rows and prove each expected file was read
Append adds records one under another. January and February each have cells for the same kind of information, so their rows belong under the same headers. Direct queries can append by header name. The file combine setup derives transformations from a sample input, so the practice expects the approved files to have the same headers, types and CSV structure. Always inspect received columns before relying on a previous combine recipe.
Keep file metadata while converting the records
Start from a Folder connection in a supported desktop app. Inspect the displayed filenames, extension and folder path before combining. Keep rows with the exact three authorized practice names, or use an explicit verified date/filename rule if you intend a period that can grow. Exclude unrelated or duplicate copies. Choose the verified sample and inspect its header promotion. The connector can apply the chosen transformation across the matching file contents. Confirm the target source is the scratch folder you intended before loading.
Preserve a File Origin field from the listing if available. If using separate source queries, add an explicit file-name label before appending. This protects the per-file checks. If February is skipped and March is accidentally imported twice, the known monetary total for that small substitution might still be ₹1,100, since both months contribute ₹400. The grand total by itself cannot catch the substitution. Per-file counts, unique IDs and dates make the mismatch visible. A missing February header could also appear as a null Amount column under some append situations; type and null checks matter.
If the same two files can appear in two subfolders, check the intended folder path as well as the file name. A trusted folder contract should say whether archived files or reissued versions belong in the report. For this exercise use exactly one source delivery per month and retain a separate original version. If you choose to skip errors, the report needs a record of skipped inputs. It should not silently change the eligible month coverage.
Test a change in file inclusion
On a separate scratch folder, consider adding 2026-04.csv with a valid new row amount 125. If your documented input scope includes only the named January–March files, the output should remain six rows and ₹1,100. A deliberately widened query with compatible headers can read the additional file, giving seven rows and ₹1,225. A one-file update can therefore be tested two ways: confirm the policy that excludes it and confirm the policy that permits it. The desired result depends on the reporting requirement, not on whether the file happened to exist.
Merge fields from one source and measure its cardinality
A merge adds matching attributes across tables. The left input here contains an order identified by Order ID and a Store ID field referring to an operating location. The right input contains one directory row per Store ID. Choose those matching fields in the same relative key order for a multi-field adaptation. For the core practice one field suffices. Use text for both Store ID columns and preserve the original key strings for review.
Look at the nested match before expanding it
In the Power Query Editor use Merge Queries or Merge Queries as New, select Orders on the left and Stores on the right, then select Store ID in both previews. Choose Left Outer, which keeps each source order available while allowing matched directory fields to be brought in. Rename the nested result column to StoreMatch if you use the following diagnostic. Add a count per nested value before expanding City Manager.
Table.RowCount([StoreMatch])
Zero is an unresolved key, one is the planned ordinary relationship, and more than one is a reference problem for this exercise. Review the latter cases before declaring the data ready. Expand City Manager for the reviewed rows, keeping the input Source File and Order ID trace available. An unmatched row can continue through a left merge with a null manager. If classification is essential before publication, expose a separate review output rather than silently dropping it.
Verify both absent and repeated match behavior
On a scratch copy change the Store ID on Q-M02 to BLK-XXX-99. Under left merge it remains one order at ₹225 with an unresolved manager. Whole result still has six rows and ₹1,100, but valid manager matches fall to five. An ordinary inner merge under those conditions could leave five orders at ₹875. That check demonstrates whether the missing reference was flagged or removed. Restore the original classification afterward.
On a different scratch copy add a competing BLK-PUN-01 row with a different fictional manager. Only the ₹100 Q-J01 purchase uses that key in this fixture. If expanded without reviewing that repeated match, it can produce seven result rows and ₹1,200, a ₹100 inflation. A first-match worksheet lookup and a query merge might handle the same defective right-side key differently. Check cardinality and output amount, then correct the directory based on reviewed evidence instead of removing an arbitrary matched row.
Unpivot a wide schedule into one observation per city and month
The wide schedule has one City per row and a separate column for each month. Each amount cell is a distinct city-month observation. Unpivot turns those column headings into values in a new Month field and puts their stored quantities in Sales. It changes the record grain from a row with three attached amounts to one observation per city and month. Keep the source labels and count the meaningful output combinations.
Choose which columns represent observations
Load the small wide table and use Unpivot Other Columns while City is selected. Rename the attribute column Month and the resulting value field Sales. Because the exercise has only three monthly measure fields besides City, this unpivots the intended columns. If a future file also includes a comment, quarterly total or extra identifier, decide whether to keep that field or select only approved month columns. A catch-all unpivot can otherwise construct a misleading extra row such as Month = Total.
The six row values are Pune January 100, February 120, March 140; and Nashik January 200, February 220, March 240. The input total is ₹1,020, and the new Sales column sum is still ₹1,020. Compute a second check for each city. The row count multiplied because each input row had three known observations. If one amount is genuinely null, unpivot can omit that observation. The current scratch missing-cell example therefore gives five values and ₹800 known money. That result should not imply the missing business month was observed as zero.
Check that the retained identifier still describes one observation
Suppose a second Pune row is added to the wide input with its own branch amounts. Unpivot would then produce several rows for the same city-month labels. The operation may be technically correct, but the intended observation could now require Branch, City and Month as the key. If the report asks for city-level totals, it needs a separate aggregation after the unpivot. If two input rows actually describe the same branch, review them before aggregating. Otherwise a later pivot could hide an accidental overlap by summing it into one cell.
Test an exact duplicate by copying the Pune row, totaling an additional ₹360. The new wide sum would become ₹1,380 and the unpivot would return nine known records. Reconciliation of the money from wide to long still passes. The intended uniqueness check on City and Month would fail. This shows why totals are necessary and insufficient: counting expected combinations, following source identity and knowing the correct grain also matter. Preserve branch or source row metadata when one city can legitimately appear more than once.
If the report needs a full city-month grid, take the intended combinations from a verified calendar and city dimension, then join the recorded values to that full set and identify missing observations. This procedure preserves a meaningful distinction between recorded zero and unknown amount. It is an extension after you can reproduce the six-row baseline. The source totals and recorded membership remain the first checks before joining additional periods.
Parse using the file's date convention, then test calendar validity
For the Raw Date practice strings keep their literal text. In a supported query editor duplicate the column and use Date type with an appropriate locale for the documented day-first pattern. Inspect the converted components for 04-03-2026. Under the declared DMY scheme it is 4 March, not 3 April. An unambiguous 14-03-2026 helps verify the rule too. Locale controls are about how the input is read, separately from how the workbook later displays the parsed date.
If exact input control is needed in a custom column, use a separate candidate expression with the input field name. Its parse result can be null when the date fails. Keep a separate outcome so a blank raw input, an impossible date and a known converted value do not all look like the same decision. Inspect this teaching sample with the explicit format below.
try Date.FromText([Raw Date], [Format="dd-MM-yyyy", Culture="en-IN"]) otherwise null
The typed output should contain 14 March 2026, 4 March 2026 and 31 December 2026. Keep the invalid 29 February 2027 visible in a separate check. It is the third original row, so use its source identity when diagnosing it. A locale setting alone can't supply correct source arrangement when a file mixes several layouts without a tag. Classify or ask for information about such a source before loading it to a report.
Trace one record from an input file to a loaded output
Identify the original file row
Q-J01 appears in January with Store ID BLK-PUN-01 and amount 100. Preserve the order key and origin.
Combine only compatible intended sources
Append the six original inputs through matching names and schema. January's independent amount remains ₹300.
Confirm one reference match
BLK-PUN-01 finds the authorized fictional manager in the shared directory. Verify there is only one match before expansion.
Check the loaded result
The order appears once with its original amount. The loaded merged report still has six orders and ₹1,100.
Lab 1 · Check an append and merge using controlled files
Prerequisites. Use the three CSV text inputs and seven-row store directory. Save the expected file names and their independent counts. Use a compatible local connector or manually reconstruct the combined result if the connector is unavailable.
- Import the three compatible CSV files and inspect the declared column names and source listing. Keep a file origin field. Verify two January, two February and two March records.
- Check Amount type and real parsed source dates. Verify ₹300, ₹400, ₹400 and six unique order keys, for a total of ₹1,100. Match Q-J01 and its source file.
- Merge with Stores using Left Outer. Before expanding, check one right-side match for each approved order. Expand City Manager and verify the chosen output field. The six original keys and ₹1,100 must still hold.
- In scratch change Q-M02's Store ID to BLK-XXX-99. Check one zero match and total ₹1,100 in the left output. Compare the expected consequence of dropping its ₹225, which would yield ₹875 and only five rows.
- In a separate scratch case add the duplicate BLK-PUN-01 directory row. Check two matches for Q-J01 before expanding. If expanded, the result has seven rows and ₹1,200. Preserve the rejected variation separately.
- Restore the controlled source set, load a new output destination and inspect the actual result. Compare source file counts and loaded data separately from the preview before accepting.
Expected result. Append adds the intended records, and merge adds a manager to the same intended order grain. The two deliberate key cases expose loss and inflation risks independently.
Troubleshoot. If combined amounts agree but per-file counts differ, inspect the directory list and applied filename filter. If a merge returns unexpected nulls, check key types and actual source values. If row count grows, check the right-side matches before expanding. For an old loaded result, inspect connection, on-sheet output and recorded refresh behavior separately.
Finish. Keep the approved scratch files and input formulas together. Revert only intentionally changed directory/source test data, and label the actual successful output.
Lab 2 · Verify text typing, date conversion and a shape change
Prerequisites. Use the 10-row scratch Orders Table, the two-city wide fixture and the Raw Date grid. Keep each source separate and choose output worksheets that do not overwrite the input. Test one alternate candidate before editing the original captures.
- Use the From Table/Range route or review its steps manually. Trim City and apply Capitalize Each Word under the approved input. Check three exact canonical outputs, six city groups, 10 rows and known amount ₹2,870. Verify the actual Decimal Number step on Amount.
- Load or compare the wide city worksheet and inspect its closed set of monthly headers. Unpivot the three that describe observations. Verify six expected combinations, Pune ₹360, Nashik ₹660 and same known total ₹1,020.
- On a scratch copy remove Nashik's February amount as a genuine null. Check five remaining visible observations and known ₹800 with one separately listed missing amount. Compare with the old output. Restore before moving on.
- Parse the four declared day-first date examples. Compare exact date parts and identify the one unresolved impossible date. Confirm the ambiguous 04-03-2026 maps to day four in March under the stated contract.
- Check one before-and-after loaded value and independent type. Test whether the worksheet format and the query Date type both suit the report. A preview of a typed value does not prove the report's downstream Table received it.
- In scratch compare one candidate change with the expected source identity. Document whether you verified using Power Query, an equivalent worksheet approach or a source trace on paper.
Expected result. All approved City and date conversions are reproducible, the unpivot grain is explicit, and an unknown value remains visible as an issue. The loaded transformation can be audited without editing the raw input.
Troubleshoot. If dates run into errors, inspect the original step that might have used a guessed type before your explicit conversion. If an unpivot returns a new month called Total, verify that only legitimate observation fields were selected. If missed records cause wrong totals, trace the missing source identity and whether its value was null.
Finish. Preserve the known fixture files and a scoped result for each exercise. Return temporary changes to independently labeled scratch data and maintain the reviewed loaded data with its output identity.
Find the first query step that breaks the expected contract
Review the data path from source to final result in the order it happens. If one row goes missing, locate which operation removed it. If the field type is wrong at input, watch the value before and after the intended type step. If an output count grows after a merge, review the right-side key count and expansion. A preview may reveal these issues sooner, but a downstream workbook does not read every preview. Verify the table it actually uses after the load or refresh.
Check how an input header change affects the intended row shape
Imagine one file spells Amount as Order Amount. The correct response depends on your approved input contract. A simple Append Queries operation matches field names, so the difference can create separate columns or nulls instead of a helpful warning. A combine recipe that expects an exact header can raise another issue. Inspect actual steps and the loaded output before deciding whether the month was missing, the amount moved to an unexpected field or input was rejected. If the data owner verifies a rename, map the alias explicitly and test every file. Keep the headers identical for the original exercise.
Try another condition where the correct January–March filenames exist but one contains a different number of rows. Inspect the file origin and new IDs before assuming a wrong parse. The source could have legitimate changes or a duplicate delivery. The original baseline expects two records from each permitted file and unique order IDs. A new approved source has a separate expected result. Document whether you're checking the same version or a newer one with a changed source contract.
Keep an explicit worked QA note for each operation
- Trim and type. Check one original whitespace value and its canonical label. Check ten rows, six city groups and ₹2,870 in the loaded output.
- Append. Verify three source filenames, two rows per file and net known amount ₹1,100. Count keys to catch mistaken duplicate month entries.
- Merge. Verify number of nested matches by source key, and compare count and amount after expansion. Capture unresolved match states separately.
- Unpivot. Compare expected wide observations with actual long rows. Validate values under the same grain and preserve coverage of any null cell.
- Date. Preserve original text, the known layout, returned calendar parts and any explicit conversion errors or null reviews.
If a new workbook only contains the loaded output, decide whether the reader needs the ability to refresh and whether the same sources are available. A portable classroom file can use a copied synthetic fixture in the local environment. A stale connection to a different learner's folder is not evidence of missing orders. Record the expected local source and update the connector deliberately in a practice copy. A change of folder path and a change of row-selection criteria are different updates and deserve separate checks.
Microsoft documents a specific case where an automated workbook refresh can leave an old worksheet-loaded Power Query Table after a query failure without throwing a VBA runtime error. This lesson does not depend on a macro refreshing data. After intentional manual refresh or load, inspect current output, approved file membership and visible errors, then compare your known values. A click or saved timestamp alone can't prove a specific input entered the report.
Compare equivalent approaches without confusing what they demonstrate
If your app cannot use local folder combine, manually import the three exact CSV files into separate tables and confirm headers and types. Append the six rows by aligning fields by their intended names, preserve the origin and compute the same totals. That reproduces the logical operation and gives a valid source-level check. It doesn't demonstrate the automatic query packaging or refresh flow. Document which parts you checked so the result can still be useful on another device.
The full manual check for an unpivot is small enough to complete without a connector too. Write each of the six city-month pairs with its original known value, sum grouped results and compare the missing-cell variation. That explains the grain before you automate it. Once you get the appropriate query tools, apply the named transformation and compare with those exact outputs. An independently computed expected answer often makes a query problem easier to diagnose than using another complicated query as its only proof.
During handoff keep the amount period and file version visible in a short report label. A later change to the file filter could expand data to April while the title still says January–March. An accurately loaded table can coexist with an old display label. Verify both at the actual output before interpreting the combined money or counts.
When validating a report handoff, ask whether a preview change and a worksheet change were seen under the same source and scope. Record one actual loaded row from Q-J01 and one group total under the intended folder filter. Keep the comparison dated if inputs may change. These branches make it clear whether a workbook failed to load a new file, correctly ignored it under a prior period, or loaded it while still showing an old title. A useful output note identifies which stage supplied each piece of evidence. Record an affected row and an unaffected row together to confirm the intended change was selective, not a whole-report replacement.
Recall without scrolling. What would catch a wrong February file that has the same total as March? Which two controls reveal the extra order caused by expanding a duplicate directory match?
Check why append and merge have different evidence
Append intentionally adds compatible rows. Merge adds attributes from matches and should preserve the intended one-row-per-order grain unless planned otherwise.
Check the null unpivot result
With the February Nashik value 220 no longer observed, the known rows are five and their amounts total ₹800. The original expected period is still documented.
Check both possible April input rules
The fixed scope stays six rows and ₹1,100. Deliberately expanding to include the new ₹125 order yields seven rows and ₹1,225.
Check the interpretation of 04-03-2026
Under the approved DMY order it is 4 March 2026. A visual date format does not establish the convention used by the converter.
Quiz · Verify what the query did
1. Which confirms all three approved files were included? A. File and ID counts with per-file amounts. B. One grand total alone. C. A workbook save timestamp.
A. February and March have the same amount total in the tiny fixture. File identity distinguishes a mistaken substitution.
2. What is the correct six-row append total? A. ₹1,100. B. ₹875. C. ₹1,020.
A. Known amounts 300, 400 and 400 add to 1,100. Other totals are different source examples.
3. What happens to an order without a store match under Left Outer? A. It stays available for review. B. It always disappears. C. Its amount becomes zero.
A. The left order persists, and the expanded reference information is unresolved.
4. Why might seven rows appear after a merge of six orders? A. Reordering City. B. Multiple matches for a key were expanded. C. The display type is date.
B. The same source order can be represented once per matching right-side row. Check nested counts before expansion.
5. A null month in the wide fixture yields how many known output rows? A. Five. B. Six automatically treated as observed. C. Three.
A. Power Query unpivot can omit the null observation. Preserve its missing evidence and known sum separately.
6. Which date needs review in the supplied DMY fixture? A. 14-03-2026. B. 31-12-2026. C. 29-02-2027.
C. 2027 has no 29 February. Keep the source text and reason for the rejected typed candidate.
Interview practice
- How is append different from merge?
- Append stacks compatible observations down rows. Merge relates matching keys and expands new attributes. I verify each operation against its intended grain.
- How do you prove all intended monthly files were processed?
- I preserve origin, compare expected file counts and known totals, and trace selected order IDs and parsed dates in the loaded output.
- Why should a merge check cardinality?
- Zero matches may leave a missing attribute and multiple matches can create extra rows. A good one-row-per-order design handles both intentionally.
- How do you prepare a monthly analysis from a wide workbook?
- I unpivot only actual period columns and keep each measured value's city and month. I reconcile known amount and separately record missing observations.
- How do you fix ambiguous query dates?
- I preserve literal input and use a verified source convention and a suitable locale or explicit parser. I test valid and impossible dates.
- What evidence proves a query completed your intended task?
- I verify the actual loaded result, sample records, expected types, counts, amounts and unresolved issues. I keep the source and output versions identifiable.
Revision cards
- Input and output. Preserve the named original source and inspect the actual loaded query result.
- Append. Confirm compatible schema, file membership and row counts by origin.
- Merge. Check how many right-side records match before expanding them.
- Unpivot. Identify the intended measures and reconcile the new observation grain.
- Locale. Read declared text dates under the correct convention before formatting them.
- Known values. Compare established sums and count missing observations separately.