Forum Discussion
Order of imported data
Hello,
I'm trying to import data from a Stored procedure (that's working fine) but that same SP generates data in several auxiliar tables which o also need.
I need to first execute the stored procedure so after that finishes, the other auxiliar tables are completed.
I can't find a way to do that, is that even possible?
Thank you
To the best of my knowledge at this time Power BI does not have any way to create dependencies between queries. You can see if it is in the Ideas and if not post it.
Are you using the 32-bit version of Power BI. I have Power BI 64-bit installed on a Windows 10 Surface 4 and I don't think I've ever had it crash on me. I used to experience lots of crashes and out-of-memory conditions when I was using Excel 32-bit early on with Power Query and Power Pivot.
4 Replies
- GrahamWadeRegular Visitor
Found this by trial and error and as far as I can tell is not documented.
From the home tab select "edit queries" there is a list of queries in the left hand panel.
Drag and drop the queries into the order you require and Save.
Works for me.
- Greg_Deckler
Community Champion
I have executed stored procedures from power query before so that should be possible. You will likely run into some security problems with doing that. Automatic refreshes have tended to fail when executing stored procedures. Some such nonsense about security and remotely executing SQL code, blah blah blah. :)
In any case, you could have one query to execute your stored procedure and then other queries to grab the auxillary tables, one query per table I would imagine. Then, if automatic refresh would work with your stored procedure, you just set the refresh schedule such that you grab the data at staggered intervals.
- AlexDiasFrequent Visitor
That sounds a little hacky...Shouldn't PBI refresh data based on the tree of tables and their dependencies instead of just reading everything at same time and randomly wait for all tasks to finish?
I also might be pushing PBI to the limit.
At this moment PBI crashes all the time with out of memory exceptions. (It's using <1gb of ram and my laptop has 32gb ram)
Maybe the best approach is actually processing all the info before it reaches PBI.
Btw, the database I'm using is from an ERP, total database size is 32 gb if that matters.
- Greg_Deckler
Community Champion
To the best of my knowledge at this time Power BI does not have any way to create dependencies between queries. You can see if it is in the Ideas and if not post it.
Are you using the 32-bit version of Power BI. I have Power BI 64-bit installed on a Windows 10 Surface 4 and I don't think I've ever had it crash on me. I used to experience lots of crashes and out-of-memory conditions when I was using Excel 32-bit early on with Power Query and Power Pivot.