JoinAlgorithm.SortMerge

Updated on

JoinAlgorithm.SortMerge (2) is an enumeration that specifies the join algorithm to be used in the join operation. It is a member of the JoinAlgorithm.Type and indicates that the algorithm performs a streaming merge based on the assumption that both tables are sorted by their join keys. While efficient, it will return incorrect results if the tables aren’t sorted as expected.

Examples

The SortMerge join algorithm is recommended only for tables that are sorted by their join keys. It returns wrong results if tables are not sorted as expected.

= Table.Join(
     Table1,  
     {"A1"}, 
     Table2, 
     {"A2"},
     JoinKind.Inner, 
     JoinAlgorithm.SortMerge // performs a join with the SortMerge algorithm
)

Other related enumerations are:

Applies to

Here’s a list of functions that work with JoinAlgorithm.Type:

Contribute » | Contributors: Rick de Groot

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy