Table.Buffer
This function stores a table in memory, protecting it from external modifications during assessment. The buffering process is not deep, as it only enforces the evaluation of individual cell values whi...
This function stores a table in memory, protecting it from external modifications during assessment. The buffering process is not deep, as it only enforces the evaluation of individual cell values while keeping complex values like records, lists, and tables intact. It is important to note that employing this function may or may not enhance query performance. At times, it can actually slow down queries due to the additional overhead of reading and storing all data in memory, as well as the restriction of downstream folding. If buffering is not necessary but you wish to prevent downstream folding, consider using Table.StopFolding instead.
Retrieve all rows from a SQL table and store them in memory. This disables the ability for any further operations to query the SQL server.
To implement this in Power Query M, use the following code:
```
Source = Sql.Database("SomeSQLServer", "MyDb"),
MyTable = Source{[Item="MyTable"]}[Data],
BufferMyTable = Table.Buffer(dbo_MyTable)
```
This code will load the table into memory and output the buffered table.