Clearer connection to dataflow using names
Simplify and clarify your Power Query code when connecting to DataFlows.
By default, Power Query generates GUI generates dataflows connection using ids
. Resulting code doesn't provide an idea of the chosen dataflow.
Using names generates clearer code:
// Power Query call dataflow with names
let
DataFlowTable = PowerPlatform.Dataflows(null)
{[Id="Workspaces"]}[Data]
{[workspaceName="MyWorkspaceName"]}[Data]
{[dataflowName="MyDataflowName"]}[Data]
{[entity="MyDataFlowTable"]}[Data]
in
DataFlowTable
// Dataflow_GUI New Connector
let
Source = PowerPlatform.Dataflows(null),
Workspaces = Source{[Id="Workspaces"]}[Data],
#"4fz7bf89-3596-4d22-888b-d42a903923ad" = Workspaces{[workspaceId="4fz7bf89-3596-4d22-888b-d42a903923ad"]}[Data],
#"8zd8511i-5e9b-4809-8816-8fd7503b8d4a" = #"4fz7bf89-3596-4d22-888b-d42a903923ad"{[dataflowId="8zd8511i-5e9b-4809-8816-8fd7503b8d4a"]}[Data],
MyDataFlowTable = #"8zd8511i-5e9b-4809-8816-8fd7503b8d4a"{[entity="MyDataFlowTable",version=""]}[Data]
in
MyDataFlowTable
// Power BI Dataflow GUI (Old Connector)
let
Source = PowerBI.Dataflows(null),
#"4fz7bf89-3596-4d22-888b-d42a903923ad" = Source{[workspaceId="4fz7bf89-3596-4d22-888b-d42a903923ad"]}[Data],
#"8zd8511i-5e9b-4809-8816-8fd7503b8d4a" = #"4fz7bf89-3596-4d22-888b-d42a903923ad"{[dataflowId="8zd8511i-5e9b-4809-8816-8fd7503b8d4a"]}[Data],
MyDataFlowTable = #"8zd8511i-5e9b-4809-8816-8fd7503b8d4a"{[entity="MyDataFlowTable"]}[Data]
in
MyDataFlowTable
Also, if you inspect a connection with dataflow using ids, you can check the dataflow name by clicking the wheel of the step Navigation
.
Please note that Microsoft advises to use the new connector Dataflow instead of Power BI dataflow.