I am trying to make sense of the Gateway logs. Yes, I know, crazy. Since we are a real company we have real gateways. One is a cluster of six VMs, the other a cluster of four. (Yes, Microsoft, there are people who use gateways with more than two cluster members!)
Each of the cluster members has their own set of GatewayInfo and GatewayErrors log files, usually a bit more than 24 hrs worth which translates into about 20 files per cluster member and category.
I have a Power Query function that retrieves the content of one type of CSV file from one cluster member . I did that to process Info and Errors separately but in hindsight that might not be necessary, they have largely the same format (or whatever you call that abomination, Microsoft!!!)
Then I have a list of my cluster members, and two referencing queries that use the cluster member list to collect all the Info files and all the Errors files.
My suspicion is that I am vastly overcomplicating the retrieval. I have a query that calls a custom function for each of the cluster members, and that custom function calls another custom function for each of the log files. Each of these functions gets the result contents and expands it to table columns. I am basically doing that Table.ExpandTableColumn in all three levels.
Is it possible instead to just take the "raw" table data and hand that back as the result of the called functions?
Here is the bottom (lowest level) function GetLog - this handles the raw log file contents for a single log file (regardless if Info or Errors)
Can I somehow shortcut the GetInfo function to return the raw table data to the last query, instead of expanding the table columns twice? Or asked differently - can a function return a (single column) table of tables, and can the receiving query expand that in one go?