Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Much more data when connecting to dataflow than directly to SQL

I've set up a dataflow that pulls selected tables from our ERP SQL.

 

When I connect to the dataflow from PBI Desktop it loads several GB's of data even though I'm selecting only a few 100 lines from two tables.

 

If I connect directly to the SQL I can load the lines in seconds. Using the dataflow it takes several minutes.

 

Am I doing something wrong?

 

My approach in both cases is the same:

  • Get Data (SQL vs Dataflow)
  • Select tables (two, in this case)
  • Transform data (filtered down to a few 100 lines in each table)
  • Yes. When you use a Dataflow as a source, to get folding, the Enhanced Compute Engine has to be turned on (premium capacity) and you need to use the Dataflows connector (not the Power BI Dataflows one).

    Pat

     

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    There is likely something breaking "query folding" in your query. The use of a SQL statement returns only the desired rows, but you should be able to get similar refresh time if you maintain query folding. There are indicators in the query editor for Dataflows to show if it is in place or not, and you can modify/rearrange your steps (e.g., do filtering and column selection first) to potentially maintain it.

     

    Pat

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks mahoneypat 

     

    Could you point me one step further?

     

    Google is giving me lots of contradictory information about query folding regarding dataflows. I don't know the term, so don't know what I'm looking for.

     

    One thing I see mentioned is the "Enhanced Compute Engine". The dataflow doesn't sit within a premium capacity. Is this the root of my issue, perhaps?

    • mahoneypat's avatar
      mahoneypat
      Microsoft Employee

      Yes. When you use a Dataflow as a source, to get folding, the Enhanced Compute Engine has to be turned on (premium capacity) and you need to use the Dataflows connector (not the Power BI Dataflows one).

      Pat

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks. So outside of Premium, Dataflows isn't really a viable option, since any datasets will have to pull entire tables every time.