QuestionQ91

VerifiedPrepare data

You are creating a data flow in Fabric to ingest data from an Azure SQL database by using a T-SQL statement.

You need to make sure that any foldable Power Query transformation steps are processed by the Microsoft SQL Server engine.

How should you complete the code? Each value may be used once, more than once, or not at all.

Drag & Drop
let
    Source = Sql.Databases(
        "server.database.windows.net"
    ),
    Database = Source{[Name = "db"]}[Data],
    Query = .(
        Database,
        " SELECT * FROM customer WHERE country IN ('USA', 'UK')",
        null,
        [ = true]
    )
in
    Query
Explanation

Value.NativeQuery executes the supplied SQL statement against the database. Passing an options record with EnableFolding set to true allows subsequent foldable transformations to be folded back to the source database, so SQL Server processes them.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!