Forum Discussion
Query Folding inconsistencies
- 6 years ago
Awesome thanks for the great information there - and as a matter of fact I did actually create a 'view' of the other datasource (as you suggested) when the penny dropped after my last reply.. so great to know my thinking is sound then! 😄
Apologies for the confusion there about using the phrase 'pre-defined M query' - all I was getting at there was that if I am 'manually' building my M query using sequential applied steps, I have to wait for the entire data import to happen on Inner Join merges, before I can move onto creating my subsequent steps (ie. the Power Query tools are not 'responding' while the data is importing, so can't move onto the next step of Expanding the merged table query, deleting columns etc..), and 'View Native Query' will be greyed out until the load is finished. However if I was to then take a copy of the actual M query that sequence of steps generates (from the Advanced Editor window - this is what I meant by saying 'pre-defined') and dump it into a new query Advanced Editor window, then the correctly-folded query already exists... so 'View Native Query' can be checked instantly at the final applied step, without having to wait ages for data to load for the 'inner join merge' step which sits midway through (I'm working with millions of rows tables here so the import wait time factor is significant to this observation).
I hope that makes more sense now - and again this is just what I've observed through my own experience 🙂
Thanks again for your great help!
A couple of thoughts:
- Move your expansion step to be immediately after the merge, then do the remove columns. I've found that by not expanding immediately after the merge, it can break folding. Not will break. Can break.
- Are the data types of the merged columns the same in both scenarios? Text to text, integer to integer, number to number, same precision if a number, etc. etc. PQ generally won't let you join unmatching columns (text to integer) but not sure how rigerous it is on a numeric field that is 9,3 precision to a field that is 9,4 precision for example.
- If those fail, can you post the M code here to both?