Created
          April 2, 2017 08:54 
        
      - 
      
 - 
        
Save TomLous/95489393f4c459e6d4e001e4aa8b22f2 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | val comparableDataset = kvKDataset.as("l") | |
| .joinWith( | |
| kvKDataset.as("r"), | |
| $"l.adresV" === $"r.adresV" && $"l.postcodePlaatsV" === $"r.postcodePlaatsV" && $"l.dossierNummer" =!= $"r.dossierNummer" | |
| ).map { | |
| case (left, right) => (left, right, Vectors.dense(left.distance(right).toArray)) | |
| } | |
| .toDF("left", "right", "features") | |
| .as[(KvKRecord, KvKRecord, Vector)] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment