vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse colocated if exists; |
| 2 | |
| 3 | create dataverse colocated; |
| 4 | |
| 5 | use dataverse colocated; |
| 6 | |
| 7 | create type UserType as open { |
| 8 | uid: int32, |
| 9 | name: string, |
| 10 | lottery_numbers: {{int32}} |
| 11 | } |
| 12 | |
| 13 | create type VisitorType as open { |
| 14 | vid: int32, |
| 15 | name: string, |
| 16 | lottery_numbers: {{int32}} |
| 17 | } |
| 18 | |
| 19 | create nodegroup group1 if not exists on nc1, nc2; |
| 20 | |
| 21 | create nodegroup group2 if not exists on nc2; |
| 22 | |
| 23 | create dataset Users(UserType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame^] | 24 | primary key uid on group1; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 25 | |
| 26 | create dataset Visitors(VisitorType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame^] | 27 | primary key vid on group2; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 28 | |
| 29 | |
| 30 | write output to nc1:"/tmp/fuzzy1.adm"; |
| 31 | |
| 32 | for $user in dataset('Users') |
| 33 | for $visitor in dataset('Visitors') |
| 34 | where $user.uid = $visitor.vid |
| 35 | return { "user_name" : $user.name, "visitor_name" : $visitor.name } |