blob: 20be1032d600cc88cf26f3c1e8653004c0c8e2bf [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
2 * Description : Test cross dataverse functionality
3 * : use dataverse statement is now optional.
4 * : Use fully qualified names to create datasets, types.
5 * : drop datasets using fully qualified names
6 * : re create the datasets
7 * : Query metadata to verify datasets are created.
8 * Expected Res : Success
9 * Date : 28th Aug 2012
10 */
11
12drop dataverse student if exists;
13drop dataverse teacher if exists;
14
15create dataverse student;
16create dataverse teacher;
17
18write output to nc1:"rttest/cross-dataverse_cross-dv04.adm";
19
20create type student.stdType as open {
21id : int32,
22name : string,
23age : int32,
24sex : string,
25dept : string
26}
27
28create type teacher.tchrType as open {
29id : int32,
30name : string,
31age : int32,
32sex : string,
33dept : string
34}
35
36create dataset student.ugdstd(stdType) partitioned by key id;
37create dataset student.gdstd(stdType) partitioned by key id;
38create dataset teacher.prof(tchrType) partitioned by key id;
39create dataset teacher.pstdoc(tchrType) partitioned by key id;
40
41drop dataset student.ugdstd;
42drop dataset student.gdstd;
43drop dataset teacher.prof;
44drop dataset teacher.pstdoc;
45
46create dataset student.ugdstd(stdType) partitioned by key id;
47create dataset student.gdstd(stdType) partitioned by key id;
48create dataset teacher.prof(tchrType) partitioned by key id;
49create dataset teacher.pstdoc(tchrType) partitioned by key id;
50
51for $l in dataset('Metadata.Dataset')
52where $l.DataverseName='student' or $l.DataverseName='teacher'
53return $l