Connector selection
Choose a connector for the workload
A connector is the Power Query interface for accessing a particular data source. It handles navigation, authentication and supported operations. A connector is not a storage mode: SQL Server can support both Import and DirectQuery in Desktop, while a local CSV is normally imported. Choose the source and connector first, then decide where data should live and how it should refresh. The source engine, connector, host, version, credentials and network path determine capabilities. In this chapter, use a disposable Import model and synthetic USD retail data; native Desktop and SQL Server execution are NOT RUN. No account or server is required for the core lab.
Example 1: choose between files and a database
A shop has five sales lines in a CSV file. Its manager needs a daily report that can work offline after refresh. Import is a reasonable choice; a local file does not offer a relational query engine to execute a SQL filter. If the same data lives in an approved SQL Server database and only selected regions are required, SQL Server is a candidate for source-side filtering. A DirectQuery report can issue queries during visual interactions; its suitability depends on source capacity, latency, feature constraints and permissions. It is not automatically faster or fresher than Import in every situation. For an OData service, supported filter/projection behavior is connector- and endpoint-specific. A file share, service endpoint or gateway is an access path, not an authorization grant.
Example 2: navigate a SQL Server table
This is a static M example for an optional approved SQL Server environment only. labServer and labDatabase must be separately configured, authorized text parameters. The database must contain dbo.Sales with the same columns as the supplied sales fixture. Do not paste real credentials into M.
let Source = Sql.Database(labServer, labDatabase), Sales = Source{[Schema="dbo", Item="Sales"]}[Data], North = Table.SelectRows(Sales, each [Region] = "North"), Result = Table.SelectColumns(North, {"LineID", "Quantity"})in ResultExpected unordered rows: L01/2, L02/1, L04/1. These are verified against the CSV-derived oracle, not a SQL Server connection. The navigation record selects an object in the connector navigation table. SQL Server column types should preserve text identifiers and numeric quantities; inspect actual metadata rather than trusting a preview. This example does not establish that the filter folded.
Check the source contract
For an approved connection record connector name, Desktop build, server engine/version, database/object, authentication mode (not secrets), permitted fields, data types, storage mode, refresh path, privacy classification and any gateway requirement. Check whether required transformations and the desired mode are supported. Preserve source semantics: a case-insensitive SQL collation may not compare text exactly like another engine; fixed decimal and timestamp conversions can change results. Use least-privilege read access and explicitly approved sources. Do not accept a certificate bypass as a routine fix. A successful Desktop connection does not prove Service refresh will work.
Practice: choose a connection
For (A) a weekly CSV extract, (B) an approved SQL Server sales view requiring interactive source queries, and (C) a public OData catalog with documented query options, propose a connector and identify two checks before choosing a storage mode. Explain why the CSV cannot be assumed to support SQL folding.