| /* |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| drop dataverse events if exists; |
| create dataverse events; |
| use dataverse events; |
| |
| |
| create type AddressType as closed { |
| /*+ val-files data/events/streets.txt */ |
| street: string, |
| /*+ val-files data/events/cities.txt */ |
| city: string, |
| /*+ interval long 100000 999999 */ |
| zip: string, |
| /*+ val-file-same-idx data/events/latlongs.txt city */ |
| latlong: point |
| } |
| |
| /*+ dgen event.adm 5*/ |
| create type EventType as closed { |
| /*+ auto 100000 */ |
| event_id: int64, |
| /*+ insert-rand-int event- - */ |
| name: string, |
| location: AddressType ?, |
| /*+ list 1 3 */ |
| organizers: {{ |
| /*+ gen-fields int 0 2 other */ |
| { |
| /*+ val-files data/uscensus/dist.all.first.cleaned data/uscensus/dist.all.last.cleaned */ |
| name: string |
| } |
| }}, |
| /*+ list 1 2 */ |
| sponsoring_sigs: [ |
| { |
| /*+ interval int 100 120 */ |
| sig_id: int32, |
| /*+ val-files data/events/chapter_names.txt */ |
| chapter_name: string |
| } |
| ], |
| /*+ list-val-file data/events/interests.txt 1 4 */ |
| interest_keywords: {{string}}, |
| /*+ interval double 5 20 */ |
| price: double?, |
| /*+ datetime-between-years 1999 2012 */ |
| start_time: datetime, |
| /*+ datetime-add-rand-hours 1 4 start_time */ |
| end_time: datetime |
| } |
| |
| |