RamanGrover29@gmail.com | 58cf330 | 2012-11-09 00:27:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Use fully qualified name to create dataset, type and index |
| 3 | * : and to access dataset |
| 4 | * Expected Result : Success |
| 5 | * Date : 29th August 2012 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | |
| 11 | write output to nc1:"rttest/cross-dataverse_cross-dv07.adm"; |
| 12 | |
| 13 | create type test.Emp as closed { |
| 14 | id:int32, |
| 15 | fname:string, |
| 16 | lname:string, |
| 17 | age:int32, |
| 18 | dept:string |
| 19 | } |
| 20 | |
| 21 | create dataset test.employee(Emp) partitioned by key id; |
| 22 | |
| 23 | load dataset test.employee |
| 24 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 25 | (("path"="nc1://data/names.adm"),("format"="delimited-text"),("delimiter"="|")); |
| 26 | |
| 27 | create index idx_employee_f_l_name on test.employee(fname,lname); |
| 28 | |
| 29 | write output to nc1:"rttest/cross-dataverse_cross-dv07.adm"; |
| 30 | |
| 31 | for $l in dataset('test.employee') |
| 32 | where $l.fname="Julio" and $l.lname="Isa" |
| 33 | return $l |
| 34 | |