29. Practice Exercises and Final Assignment
29.2 Modules 3–5: Getting Data, Databases, Web and Google Sheets
- Connect to an Excel workbook (
DarkStores.xlsx) containing two sheets and one formatted table. Which items appear in the Navigator? - Write three situations where DirectQuery would be preferred over Import (hint: think of a live order-tracking screen).
- Explain the difference between DirectQuery and Live connection in your own words and fill a 5-row comparison table from memory.
- Connect to SQL Server (Express)
QuickCommerceDBwith Windows authentication. Load Orders and DarkStore via the Navigator, filter to the six Maharashtra cities and check View Native Query. - Write a native SQL query with a JOIN between Orders and DarkStore and
WHERE City IN (...). Explain why later Power Query steps may no longer fold. - Connect to a local MySQL database. Note the driver you installed and one error you saw and fixed.
- Change the SQL server name from
QCTEST01toQCSERVER01using Data source settings › Change Source. - Scrape an HTML table of Maharashtra districts from a public page (following its terms of use), clean footnote marks and merge a Division column into DarkStore.
- Use Add table using examples to extract two columns from a page that has no HTML table.
- Load a Google Sheet of daily targets with the Google Sheets connector, then the same sheet via a published CSV link. Which method would you use for customer data, and why?
- Convert a single-page web query into a function and load pages 1–3 using
{1..3}and Invoke Custom Function. - Load a small JSON API response into a table with
Json.Document.
Ravindra Bagale's Tip
A common mistake is connecting to a source and loading it without checking the data types and row counts. For every getting-data exercise, write down the number of rows you expect and compare it with what loaded. Practise, and it will feel very easy.
Ravindra Bagale's Tip – मराठी
एक common चूक म्हणजे source ला connect करून data types आणि row counts न तपासता load करणं. प्रत्येक getting-data exercise साठी अपेक्षित rows ची संख्या लिहून ठेवा आणि load झालेल्याशी तिची तुलना करा. Practice करा, मग एकदम सोपं वाटेल.
Ravindra Bagale's Tip – हिंदी
एक common गलती है source से connect करके data types और row counts check किए बिना load कर देना. हर getting-data exercise के लिए अपेक्षित rows की संख्या लिख लो और load हुए data से उसकी तुलना करो. Practice करो, फिर बहुत आसान लगेगा.