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 | * : Query metadata to verify datasets are dropped. |
| 7 | * Expected Res : Success |
| 8 | * Date : 28th Aug 2012 |
| 9 | */ |
| 10 | |
| 11 | drop dataverse student if exists; |
| 12 | drop dataverse teacher if exists; |
| 13 | |
| 14 | create dataverse student; |
| 15 | create dataverse teacher; |
| 16 | |
| 17 | write output to nc1:"rttest/cross-dataverse_cross-dv03.adm"; |
| 18 | |
| 19 | create type student.stdType as open { |
| 20 | id : int32, |
| 21 | name : string, |
| 22 | age : int32, |
| 23 | sex : string, |
| 24 | dept : string |
| 25 | } |
| 26 | |
| 27 | create type teacher.tchrType as open { |
| 28 | id : int32, |
| 29 | name : string, |
| 30 | age : int32, |
| 31 | sex : string, |
| 32 | dept : string |
| 33 | } |
| 34 | |
| 35 | create dataset student.ugdstd(stdType) partitioned by key id; |
| 36 | create dataset student.gdstd(stdType) partitioned by key id; |
| 37 | create dataset teacher.prof(tchrType) partitioned by key id; |
| 38 | create dataset teacher.pstdoc(tchrType) partitioned by key id; |
| 39 | |
| 40 | drop dataset student.ugdstd; |
| 41 | drop dataset student.gdstd; |
| 42 | drop dataset teacher.prof; |
| 43 | drop dataset teacher.pstdoc; |
| 44 | |
| 45 | count( |
| 46 | for $l in dataset('Metadata.Dataset') |
| 47 | where $l.DataverseName='student' or $l.DataverseName='teacher' |
| 48 | return $l |
| 49 | ) |