| /* |
| * Description : Use fully qualified name to create dataset, type and index |
| * : and to access dataset |
| * Expected Result : Success |
| * Date : 29th August 2012 |
| */ |
| |
| drop dataverse test if exists; |
| create dataverse test; |
| |
| write output to nc1:"rttest/cross-dataverse_cross-dv07.adm"; |
| |
| create type test.Emp as closed { |
| id:int32, |
| fname:string, |
| lname:string, |
| age:int32, |
| dept:string |
| } |
| |
| create dataset test.employee(Emp) partitioned by key id; |
| |
| load dataset test.employee |
| using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| (("path"="nc1://data/names.adm"),("format"="delimited-text"),("delimiter"="|")); |
| |
| create index idx_employee_f_l_name on test.employee(fname,lname); |
| |
| write output to nc1:"rttest/cross-dataverse_cross-dv07.adm"; |
| |
| for $l in dataset('test.employee') |
| where $l.fname="Julio" and $l.lname="Isa" |
| return $l |
| |