genia.likes.science@gmail.com | 54f2323 | 2013-07-13 18:49:27 -0700 | [diff] [blame^] | 1 | drop dataverse TinySocial if exists; |
| 2 | create dataverse TinySocial; |
| 3 | use dataverse TinySocial; |
| 4 | |
| 5 | create type TwitterUserType as open { |
| 6 | screen-name: string, |
| 7 | lang: string, |
| 8 | friends_count: int32, |
| 9 | statuses_count: int32, |
| 10 | name: string, |
| 11 | followers_count: int32 |
| 12 | } |
| 13 | |
| 14 | create type TweetMessageType as closed { |
| 15 | tweetid: string, |
| 16 | user: TwitterUserType, |
| 17 | sender-location: point?, |
| 18 | send-time: datetime, |
| 19 | referred-topics: {{ string }}, |
| 20 | message-text: string |
| 21 | } |
| 22 | |
| 23 | create type EmploymentType as open { |
| 24 | organization-name: string, |
| 25 | start-date: date, |
| 26 | end-date: date? |
| 27 | } |
| 28 | |
| 29 | create type FacebookUserType as closed { |
| 30 | id: int32, |
| 31 | alias: string, |
| 32 | name: string, |
| 33 | user-since: datetime, |
| 34 | friend-ids: {{ int32 }}, |
| 35 | employment: [EmploymentType] |
| 36 | } |
| 37 | |
| 38 | create type FacebookMessageType as closed { |
| 39 | message-id: int32, |
| 40 | author-id: int32, |
| 41 | in-response-to: int32?, |
| 42 | sender-location: point?, |
| 43 | message: string |
| 44 | } |
| 45 | |
| 46 | create dataset FacebookUsers(FacebookUserType) |
| 47 | primary key id; |
| 48 | |
| 49 | create dataset FacebookMessages(FacebookMessageType) |
| 50 | primary key message-id; |
| 51 | |
| 52 | create dataset TwitterUsers(TwitterUserType) |
| 53 | primary key screen-name; |
| 54 | |
| 55 | create dataset TweetMessages(TweetMessageType) |
| 56 | primary key tweetid; |
| 57 | |
| 58 | load dataset FacebookUsers using localfs |
| 59 | (("path"="localhost:///home/genia/Desktop/dataset/fbu.adm"),("format"="adm")); |
| 60 | |
| 61 | load dataset FacebookMessages using localfs |
| 62 | (("path"="localhost:///home/genia/Desktop/dataset/fbm.adm"),("format"="adm")); |
| 63 | |
| 64 | load dataset TwitterUsers using localfs |
| 65 | (("path"="localhost:///home/genia/Desktop/dataset/twu.adm"),("format"="adm")); |
| 66 | |
| 67 | load dataset TweetMessages using localfs |
| 68 | (("path"="localhost:///home/genia/Desktop/dataset/twm.adm"),("format"="adm")); |