vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse events if exists; |
| 2 | create dataverse events; |
| 3 | use dataverse events; |
| 4 | |
| 5 | |
| 6 | create type AddressType as closed { |
| 7 | /*+ val-files data/events/streets.txt */ |
| 8 | street: string, |
| 9 | /*+ val-files data/events/cities.txt */ |
| 10 | city: string, |
| 11 | /*+ interval long 100000 999999 */ |
| 12 | zip: string, |
| 13 | /*+ val-file-same-idx data/events/latlongs.txt city */ |
| 14 | latlong: point |
| 15 | } |
| 16 | |
| 17 | /*+ dgen event.adm 5*/ |
| 18 | create type EventType as closed { |
| 19 | /*+ auto 100000 */ |
| 20 | event_id: int64, |
| 21 | /*+ insert-rand-int event- - */ |
| 22 | name: string, |
| 23 | location: AddressType ?, |
| 24 | /*+ list 1 3 */ |
| 25 | organizers: {{ |
| 26 | /*+ gen-fields int 0 2 other */ |
| 27 | { |
| 28 | /*+ val-files data/uscensus/dist.all.first.cleaned data/uscensus/dist.all.last.cleaned */ |
| 29 | name: string |
| 30 | } |
| 31 | }}, |
| 32 | /*+ list 1 2 */ |
| 33 | sponsoring_sigs: [ |
| 34 | { |
| 35 | /*+ interval int 100 120 */ |
| 36 | sig_id: int32, |
| 37 | /*+ val-files data/events/chapter_names.txt */ |
| 38 | chapter_name: string |
| 39 | } |
| 40 | ], |
| 41 | /*+ list-val-file data/events/interests.txt 1 4 */ |
| 42 | interest_keywords: {{string}}, |
| 43 | /*+ interval double 5 20 */ |
| 44 | price: double?, |
| 45 | /*+ datetime-between-years 1999 2012 */ |
| 46 | start_time: datetime, |
| 47 | /*+ datetime-add-rand-hours 1 4 start_time */ |
| 48 | end_time: datetime |
| 49 | } |
| 50 | |
| 51 | |