RamanGrover29@gmail.com | 58cf330 | 2012-11-09 00:27:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Create internal and external datasets in more than one dataverse and query metadata to verify entries in Metadata. |
| 3 | * Expected Res : Success |
| 4 | * Date : Sep 20 2012 |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test1 if exists; |
| 8 | drop dataverse test2 if exists; |
| 9 | create dataverse test1; |
| 10 | create dataverse test2; |
| 11 | |
| 12 | write output to nc1:"rttest/cross-dataverse_cross-dv19.adm"; |
| 13 | |
| 14 | create type test1.testtype as open { |
| 15 | id : int32, |
| 16 | name : string, |
| 17 | loc: point, |
| 18 | time: datetime |
| 19 | } |
| 20 | |
| 21 | create type test2.testtype as open { |
| 22 | id : int32, |
| 23 | name : string?, |
| 24 | loc: point, |
| 25 | time: datetime |
| 26 | } |
| 27 | |
| 28 | create type test1.Tweet as open { |
| 29 | id: int32, |
| 30 | tweetid: int64, |
| 31 | loc: point, |
| 32 | time: datetime, |
| 33 | text: string |
| 34 | } |
| 35 | |
| 36 | create dataset test1.t1(testtype) partitioned by key id; |
| 37 | |
| 38 | create dataset test2.t2(testtype) partitioned by key id; |
| 39 | |
| 40 | create dataset test2.t3(testtype) partitioned by key id; |
| 41 | |
| 42 | create dataset test1.t2(testtype) partitioned by key id; |
| 43 | |
| 44 | create dataset test1.t3(testtype) partitioned by key id; |
| 45 | |
| 46 | create dataset test2.t4(testtype) partitioned by key id; |
| 47 | |
| 48 | create external dataset test1.TwitterData(Tweet) |
| 49 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 50 | (("path"="nc1://data/twitter/extrasmalltweets.txt"),("format"="adm")); |
| 51 | |
| 52 | for $l in dataset('Metadata.Dataset') |
| 53 | where $l.DataverseName='test1' or $l.DataverseName='test2' or $l.DataverseName='TwitterData' |
| 54 | return $l |
| 55 | |
| 56 | |
| 57 | |