title: Kusto (KQL) Join on Multiple columns
body: <p>I'm producing two pivoted data sets:</p>
  
  <p>Data set 1:</p>
  
  <pre><code>let T1 = 
  data
  | where col1 == "blah"
  | evaluate pivot(col2, count(col2), col3, col4);
  </code></pre>
  
  <p>Data set 2:</p>
  
  <pre><code>let T2 = 
  data
  | where col1 == "blahblah"
  | evaluate pivot(col2, count(col2), col3, col4);
  </code></pre>
  
  <p>Both of these data sets produce the information that I want. But I'd like to see them all in 1 table so I join them..</p>
  
  <pre><code>T1
  | join kind=leftouter T2 on col3,col4
  </code></pre>
  
  <p>When I join these two data sets the record sets join, but the pivoted counted columns become a multiplied by 4. I've tried explicitly defining left and right in several ways.</p>
  
  <pre><code>Conbinations of:
  | join kind=leftouter T2 on $left.col3 == $right.col3, $left.col4 == $right.col4
  | join kind=leftouter T2 on ($left.col3 == $right.col3, $left.col4 == $right.col4)
  | join kind=leftouter T2 on ($left.col3 == $right.col3 and $left.col4 == $right.col4)
  </code></pre>
  
  <p>Is there a syntax for multiple column joins? I can't find any reference to multiple columns in the documentation.</p>
  
  <p>I've also tried creating one column to join on and still get the 4 time multiplier -Wondering if this is a bug in Kusto?</p>
  
  <p>e.g. 
  Data set 1:</p>
  
  <pre><code>let T1 = 
  data
  | where col1 == "blah"
  | evaluate pivot(col2, count(col2), col3, col4)
  | extend joiny=strcat(col3,col4);
  </code></pre>
  
  <p>Data set 2:</p>
  
  <pre><code>let T2 = 
  data
  | where col1 == "blahblah"
  | evaluate pivot(col2, count(col2), col3, col4)
  | extend joiny=strcat(col3,col4);
  </code></pre>
  
  <p>and then join:</p>
  
  <pre><code>T1
  | join kind=leftouter T2 on joiny
  </code></pre>
  
  <p>This still results in a dataset where all the pivoted columns are multiplied by 4.</p>
  
  <p>Any help / syntax / advise would be helpful! Thanks. </p>
  
  <p>EDIT</p>
  
  <p>I've since removed the use of materialize() around these two data sets and the behavior is as expected. It's now working, but I'm still at a loss as to why. </p>