Created
December 11, 2014 23:46
-
-
Save gregology/97cf4cb7ac973ac62e2e 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
foo = sc.records([{'foo': 123}, {'foo': 321}]) | |
bar = sc.records([{'bar': 123}, {'bar': 321}]) | |
baz = sc.records([{'baz': 123}, {'baz': 321}]) | |
qux = foo.cartesian(bar)\ | |
.map(lambda (x,y): x.merge(y))\ | |
.cartesian(baz)\ | |
.map(lambda (x,y): x.merge(y)) | |
qux.collect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment