Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Value.NativeQuery() supports parameter placeholders during Power Query preview evaluation, but parameter bindings are not preserved during DirectQuery runtime execution after Close & Apply.
This causes runtime SQL execution failures such as:
Must declare the scalar variable @Param -- for MS SQL Server database
OR
ORA-01008: not all variables bound -- for Oracle database
when the DirectQuery engine reconstructs SQL without rebinding parameters.
Unsafe for text parameters.
Example:
Value.NativeQuery(
Source,
"SELECT * FROM Table WHERE Name = '" & Param & "'"
)
Problems:
Not viable in many enterprise/vendor-managed environments:
Folding applies transformations after source query generation in many cases.
This does not support scenarios where parameters must:
Add official runtime parameter binding support for Value.NativeQuery() in DirectQuery mode.
Value.NativeQuery(
Source,
"
SELECT *
FROM Sales
WHERE SaleDate >= @StartDate
AND SaleDate < @EndDate
",
[
StartDate = StartDateParam,
EndDate = EndDateParam
]
)
with guaranteed preservation of:
through the full DirectQuery execution pipeline.
Microsoft could strengthen the proposal further with optional features like:
[
StartDate = type date,
CustomerId = Int64.Type
]
to ensure providers bind correctly.
Support:
WHERE Region IN @RegionList
with structured array binding instead of string expansion.
This capability would:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.