RamanGrover29@gmail.com | 58cf330 | 2012-11-09 00:27:45 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 12 | drop dataverse student if exists; |
| 13 | drop dataverse teacher if exists; |
| 14 | |
| 15 | create dataverse student; |
| 16 | create dataverse teacher; |
| 17 | |
| 18 | write output to nc1:"rttest/cross-dataverse_cross-dv04.adm"; |
| 19 | |
| 20 | create type student.stdType as open { |
| 21 | id : int32, |
| 22 | name : string, |
| 23 | age : int32, |
| 24 | sex : string, |
| 25 | dept : string |
| 26 | } |
| 27 | |
| 28 | create type teacher.tchrType as open { |
| 29 | id : int32, |
| 30 | name : string, |
| 31 | age : int32, |
| 32 | sex : string, |
| 33 | dept : string |
| 34 | } |
| 35 | |
| 36 | create dataset student.ugdstd(stdType) partitioned by key id; |
| 37 | create dataset student.gdstd(stdType) partitioned by key id; |
| 38 | create dataset teacher.prof(tchrType) partitioned by key id; |
| 39 | create dataset teacher.pstdoc(tchrType) partitioned by key id; |
| 40 | |
| 41 | drop dataset student.ugdstd; |
| 42 | drop dataset student.gdstd; |
| 43 | drop dataset teacher.prof; |
| 44 | drop dataset teacher.pstdoc; |
| 45 | |
| 46 | create dataset student.ugdstd(stdType) partitioned by key id; |
| 47 | create dataset student.gdstd(stdType) partitioned by key id; |
| 48 | create dataset teacher.prof(tchrType) partitioned by key id; |
| 49 | create dataset teacher.pstdoc(tchrType) partitioned by key id; |
| 50 | |
| 51 | for $l in dataset('Metadata.Dataset') |
| 52 | where $l.DataverseName='student' or $l.DataverseName='teacher' |
| 53 | return $l |