hi Guys,
i am refreshing few queries using button and code.
Sub RefreshAllOutputQueries()
Dim conn As WorkbookConnection
For Each conn In ThisWorkbook.connections
With conn.OLEDBConnection
.BackgroundQuery = False 'or true, up to you
.Refresh
End With
End If
Next connEnd Sub
And this is working fine but after code Power Query creates additional processes in my PC memory:
This is making my pc slow. How to get rid of them? Why Power Quert created them?
Best,
Jacek
Hello,
Not a really an answer to why these tasks are created, but you can always kill them if they are not needed.
Br,
Anders
Hi,
thanks, i know how to kill task from task manager.
I want to prevent them to still staying there after queries refreshed.
Best,
Jacek
Hello,
Well, my thought was that you could call the taskkill command from whithin your VBA code.
Br,
Anders
Hmm. it is force method to delete it.
My question is why Power query doesnt kill the process alone?
Why i have still this open?
maybe i could finish power query somehow in code?
Best,
Jacek
Hello,
I searched for the exe file and found this blog post, seems you get to live with it.
Question: does it behave differently if you run the .BackgroundQuery with yes parameter than with no parameter?
Br,
Anders
Hello Anders,
thanks.
Yes it is the same but refreshin time is faster or seems to be faster (and still goin in background).
I have even more mashupContainers now.
Question is if they will kill my CPU ?
If not how we can destroy it using VBA or some kind of PowerQuery process?
I read here on forum that you can add one query with "ZZZZZZ" (to be refreshed as last one) to cheat PQ and finish all queries so i did:
1. I added table with only one row called "ZZZZZZZ_PQ" and now i refresh also it as last one (PQ takes queries alphabetically)
2. It didnt change anything - still mashups shows up.
Best,
Jacek
Happened to me this morning too. Not sure what is happening with the Mashup. I run my refresh, all data is brought back but the Mashup.Container.Loader stays there. If I try to load the data again, I get an error that it doesn't work. I need to kill the mashup for the refresh to work a second time.
I'm getting my data from a website. Not sure if this is the problem. This is the first time I have a problem with Power Query not refreshing...
Try my solution from post above. I think that it helped.