PL-300 Prepare the data Practice Question
Exhibit
Refer to the exhibit.
// Power Query M code
let
Source = Sql.Database("server", "database"),
dbo_Orders = Source{[Schema="dbo",Item="Orders"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_Orders, each [OrderDate] > #date(2024,1,1)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"CreditCardNumber"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"OrderDate", type date}})
in
#"Changed Type"Refer to the exhibit. You are reviewing a Power Query script. The script fails with a 'DataSource.Error: Microsoft SQL: Login failed for user' error. Which step should you check first?
⚠ Common exam trap
The trap here is that candidates may focus on data transformation steps (like removing columns or changing types) because they appear later in the query, but the error originates at the very first step—the Source step—where authentication is validated before any data is retrieved.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The credentials used in the Source step.
The error 'DataSource.Error: Microsoft SQL: Login failed for user' indicates an authentication failure when connecting to the SQL Server database. This occurs at the Source step, where Power Query first attempts to establish a connection using the provided credentials. Checking and correcting the credentials in the Source step is the logical first step because no subsequent data transformations (like removing columns, changing types, or filtering rows) can execute if the initial data source connection fails.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The column name in #"Removed Columns".
Why it's wrong here
The column name in #"Removed Columns" is irrelevant to the login failure because that transformation operates on data already fetched from the source. The error occurs before that step runs — the Source connection itself failed. Even if the column name were misspelled, it would trigger a schema/field-not-found error during transformation, never an authentication error like 'Login failed'.
- ✗
The data type transformation in #"Changed Type".
Why it's wrong here
The data type transformation in #"Changed Type" only affects the in-memory representation of columns, not the authentication handshake with the data source. It runs after the Source step has already succeeded, so any type mismatch would produce a conversion or coercion error, not a credentials failure. Power Query does not send the column types as part of the connection request; they are applied locally to the loaded data.
- ✗
The filter condition in #"Filtered Rows".
Why it's wrong here
The filter condition in #"Filtered Rows" is a downstream record-level restriction and is completely unrelated to the credential verification performed in the Source step. The query's execution order means the filter is evaluated only after the connection is established and data is loaded; the native database engine rejects the connection before any filtering can happen. Thus, even an invalid or malformed filter predicate cannot manifest as a login error.
- ✓
The credentials used in the Source step.
Why this is correct
The credentials used in the Source step are the root cause: the 'Login failed' error indicates the authentication attempt to the underlying data source was rejected. In Power Query, each data source stores its own credentials, and during refresh the engine retrieves them and passes them to the provider; if they are wrong, expired, or lack the required permissions, the connection fails immediately. This error surfaces before any subsequent query steps execute, so correcting or re-entering the credentials in the data source settings is the appropriate resolution.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 524 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.