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 | |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 19 | create dataset Users(UserType) |
buyingyi | 5602446 | 2013-07-16 20:35:55 -0700 | [diff] [blame] | 20 | primary key uid; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 21 | |
| 22 | create dataset Visitors(VisitorType) |
buyingyi | 5602446 | 2013-07-16 20:35:55 -0700 | [diff] [blame] | 23 | primary key vid; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 24 | |
| 25 | |
| 26 | write output to nc1:"/tmp/fuzzy1.adm"; |
| 27 | |
| 28 | for $user in dataset('Users') |
| 29 | for $visitor in dataset('Visitors') |
| 30 | where $user.uid = $visitor.vid |
| 31 | return { "user_name" : $user.name, "visitor_name" : $visitor.name } |