blob: 335f11ce5d4891c577a92ce56f9ab21d443a179d [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
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
7drop dataverse test1 if exists;
8drop dataverse test2 if exists;
9create dataverse test1;
10create dataverse test2;
11
12write output to nc1:"rttest/cross-dataverse_cross-dv19.adm";
13
14create type test1.testtype as open {
15id : int32,
16name : string,
17loc: point,
18time: datetime
19}
20
21create type test2.testtype as open {
22id : int32,
23name : string?,
24loc: point,
25time: datetime
26}
27
28create type test1.Tweet as open {
29 id: int32,
30 tweetid: int64,
31 loc: point,
32 time: datetime,
33 text: string
34}
35
36create dataset test1.t1(testtype) partitioned by key id;
37
38create dataset test2.t2(testtype) partitioned by key id;
39
40create dataset test2.t3(testtype) partitioned by key id;
41
42create dataset test1.t2(testtype) partitioned by key id;
43
44create dataset test1.t3(testtype) partitioned by key id;
45
46create dataset test2.t4(testtype) partitioned by key id;
47
48create external dataset test1.TwitterData(Tweet)
49using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
50(("path"="nc1://data/twitter/extrasmalltweets.txt"),("format"="adm"));
51
52for $l in dataset('Metadata.Dataset')
53where $l.DataverseName='test1' or $l.DataverseName='test2' or $l.DataverseName='TwitterData'
54return $l
55
56
57