Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. +-------+------------+-----------+
  2. |id |ssn |
  3. +-------+------------+
  4. |[5, 1, 2] |[200]|
  5. |[3] |[201]|
  6. |[4] |[202]|
  7. +-------+------------+
  8.  
  9. +---------+
  10. |ssn2 |id |
  11. +---------+-
  12. |901|[1, 2]|
  13. |902|[5] |
  14. |903|[3, 4]|
  15. +---------+--
  16.  
  17. +---+------------+-----------+
  18. |id |ssn |ssn2
  19. +-------+------------+
  20. |[5, 1, 2] |[200]|901,902
  21. |[3] |[201]|903
  22. |[4] |[202]|903
  23. +-------+------------+
  24.  
  25. ds1.join(ds2,functions.split(functions.col(ds1.col("id"))).contains(
  26.  
  27. functions.split(functions.col(ds2.col("id")))
  28.  
  29. ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement