Power Query - Query Folding (The key to faster query execution)

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 48

  • @Quidisi
    @Quidisi 3 месяца назад +9

    Wow! I always thought query folding was some sort of witchcraft that was too complex for my meager brain to understand. But once again, your video cut through the fog of confusion and made it relatively simple to grasp.
    Thanks so much!
    PS - Yes I have a lot of dataflows that take many minutes to run - I will definitely go do some inspections, now.

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      Let us know if you are able to get any of them to process faster. Thanks for all your support.

  • @iankr
    @iankr 3 месяца назад +4

    Interesting video, many thanks! In my job, all our Power Queries take their data from Excel sources, so folding doesn't occur. This concept is useful to know, however, just in case things change.

    • @bcti-bcti
      @bcti-bcti  3 месяца назад +4

      Yeah, if all your data comes from Excel files, then there's not much to capitalize on here. But like you said, that could change. Thanks for watching.

    • @stevenflax
      @stevenflax 3 месяца назад +2

      I also don't query external databases but it was so well explained that I feel I have a much better understanding of how PQ works "under the bonnet". Thanks!!

  • @Simon-vc1wk
    @Simon-vc1wk 2 дня назад

    Wow I definitely learnt something watching this video. Hopefully, these icons come to the desktop version

    • @bcti-bcti
      @bcti-bcti  2 дня назад +1

      @@Simon-vc1wk I hope so as well. They’re super useful (and pretty).

    • @Simon-vc1wk
      @Simon-vc1wk 2 дня назад

      @bcti-bcti I have a list of IDs I want to pass dynamically back to a query being folded. Is this possible, i.e., use a particular step as part of SQL WHERE IDs IN (IDs to be inserted) Statement

  • @vitorviotti
    @vitorviotti 2 месяца назад +1

    Finally someone gave nore details about query folding. Thank you for that. I got a question, and I hope someone can give me more details. You clearly mebtioned about the folsing happening when the step can be translated to SQL, is there a reference documentation that expand on this concept? Are there any clauses that won't work with folding?

    • @bcti-bcti
      @bcti-bcti  2 месяца назад +1

      I don't know of any official (or unofficial for that matter) documentation that lists foldable versus non-fordable actions. This would vary wildly from data source to data source. As far as SQL-specific clauses, I would say that if it can be done by writing the SQL statement in any other fashion, then it's most likely a foldable step. Thanks for watching.

  • @kkravch
    @kkravch 2 месяца назад +1

    Just wanted to revisit this video. I wonder whether it make any difference if one, instead of relaying on the folding function, simply sets the SQL query at the source dialogue. I have done it many times in the past to get more organized and overall less data to deal with on the power query side. Writing your own query disables the folding, as far as I remember, but at the time I felt like the native SQL query would take noticeably less time to run and refresh. Did anyone do any test comparing (properly working!) folding vs native SQL at the source? Thanks

    • @bcti-bcti
      @bcti-bcti  2 месяца назад

      @@kkravch I run some tests in the next few days and let you know my findings.

    • @pabeader1941
      @pabeader1941 2 месяца назад +1

      @@bcti-bcti You CAN enable folding of Native Queries. There are a number of videos and Blog posts that cover it.

    • @bcti-bcti
      @bcti-bcti  2 месяца назад

      @@pabeader1941 I’ll go back and check my sources on that. Either I was misinformed or I misunderstood. Thanks.

  • @pabeader1941
    @pabeader1941 2 месяца назад +1

    Note: Just because you lose the folding indicator, you may still be folding. There is a tool that you can use to see the actual query that is being generated to KNOW for sure.

    • @bcti-bcti
      @bcti-bcti  2 месяца назад

      Good to know. Can you share the name of the tool? I'd love to try it out.

  • @jessicajolly7828
    @jessicajolly7828 3 месяца назад

    This is such a great explanation. I usually describe it as “outsourcing” back to the source. One thing I found interesting - you did a Changed Type step that didn’t break query folding. Usually they do.

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      "Outsourcing"... I like that!. Yeah, that was a lucky one in that it was a data typing step that SQL understands. Thanks for watching.

    • @pabeader1941
      @pabeader1941 2 месяца назад

      @@bcti-bcti I think of it more like a step that the PQ engine knows how to translate to SQL. ALL datatype conversions are possible in SQL, it's PQ engine that is not translating it correctly.

    • @bcti-bcti
      @bcti-bcti  2 месяца назад

      @@pabeader1941 I’ll concede that point as I’m sure you are more knowledgeable about SQL than I. Thanks.

  • @FsoOmar
    @FsoOmar 3 месяца назад

    It's always good to be informed about anything in PQ; I don't deal or use SQL, but who knows! Query Folding. Thanks for the info. (I haven't watched the vid yet😊.)

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      Wow; a comment made BEFORE the video is watched. That shows pure, undiluted support. Thank you.

  • @johnjoannou372
    @johnjoannou372 3 месяца назад

    Thanks so much for this video, I'd like to see the whole setup though, from the connection to the server through to the end result. Only to see if the steps I'd normally take in Power Query are the same or different if it's being actioned at the server level.
    Really appreciate these vids.. :)

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      To test performance, you could always break the query at the earlier stage of processing and make sure it remains broken. Thanks for watching.

  • @Vogeln
    @Vogeln 3 месяца назад

    Amazing tutorial. You rock!!! Thank you.

    • @bcti-bcti
      @bcti-bcti  3 месяца назад +1

      So glad you liked it. Hope it helps.

  • @eranberl
    @eranberl 3 месяца назад

    Thanks for the great explanation 👍

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      You are very welcome. Thanks for taking the time to watch.

  • @kebincui
    @kebincui 3 месяца назад

    Excellent as always❤

  • @ahmedshalaby9343
    @ahmedshalaby9343 4 дня назад

    Awesome

    • @bcti-bcti
      @bcti-bcti  4 дня назад

      Glad you found it helpful.

  • @asam
    @asam 3 месяца назад

    AWESOME!

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      Thank you! We appreciate you taking the time to watch.

  • @ziomekzedzielni1
    @ziomekzedzielni1 3 месяца назад

    Will it work with MS Access files as source? Or that doesn't matter if it's Excel or Access files?

    • @bcti-bcti
      @bcti-bcti  3 месяца назад +1

      I think some steps are folded to Access, but it seems to break far more easily than when using a more sophisticated database like SQL. Thanks for watching.

  • @kkravch
    @kkravch 3 месяца назад

    PROFESSOR!

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      STUDENT!!!!
      (Thanks for watching.)

  • @scotolivera8207
    @scotolivera8207 2 месяца назад

    Thanks a lottttttttttt

    • @bcti-bcti
      @bcti-bcti  2 месяца назад

      You are most welcome!!!

  • @txreal2
    @txreal2 3 месяца назад +1

    Think SQL. 👍

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      Absolutely! Thanks SQL for the help.

  • @jessicajolly7828
    @jessicajolly7828 3 месяца назад

    I always think of the Fleetwood Mac song “Never Break the Chain”-never break the fold!

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      Now I'll be hearing that in my head from now on. Thanks for the earworm.

  • @drewbbc7074
    @drewbbc7074 3 месяца назад

    Five stars.

    • @bcti-bcti
      @bcti-bcti  3 месяца назад

      WOW! Who could ask for anything more? Thank you.

  • @RichardJones73
    @RichardJones73 3 месяца назад

    I guess getting data from Microsoft access won't be speeded up either

    • @bcti-bcti
      @bcti-bcti  3 месяца назад +1

      I think some steps are folded to Access, but it seems to break far more easily than when using a more sophisticated database like SQL.