blob: 335f11ce5d4891c577a92ce56f9ab21d443a179d [file] [log] [blame]
/*
* Description : Create internal and external datasets in more than one dataverse and query metadata to verify entries in Metadata.
* Expected Res : Success
* Date : Sep 20 2012
*/
drop dataverse test1 if exists;
drop dataverse test2 if exists;
create dataverse test1;
create dataverse test2;
write output to nc1:"rttest/cross-dataverse_cross-dv19.adm";
create type test1.testtype as open {
id : int32,
name : string,
loc: point,
time: datetime
}
create type test2.testtype as open {
id : int32,
name : string?,
loc: point,
time: datetime
}
create type test1.Tweet as open {
id: int32,
tweetid: int64,
loc: point,
time: datetime,
text: string
}
create dataset test1.t1(testtype) partitioned by key id;
create dataset test2.t2(testtype) partitioned by key id;
create dataset test2.t3(testtype) partitioned by key id;
create dataset test1.t2(testtype) partitioned by key id;
create dataset test1.t3(testtype) partitioned by key id;
create dataset test2.t4(testtype) partitioned by key id;
create external dataset test1.TwitterData(Tweet)
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/twitter/extrasmalltweets.txt"),("format"="adm"));
for $l in dataset('Metadata.Dataset')
where $l.DataverseName='test1' or $l.DataverseName='test2' or $l.DataverseName='TwitterData'
return $l