blob: 19348a647da875400f49cf7e5a07b9188dd8d6d9 [file] [log] [blame]
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type AddressType as open {
number: int32,
street: string,
city: string
}
create type CustomerType as open {
cid: int32,
name: string,
age: int32?,
address: AddressType?,
interests: {{string}},
children: [ { name: string, age: int32? } ]
}
create dataset Customers(CustomerType) partitioned by key cid;
load dataset Customers
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/semistructured/tiny01/customer.adm"),("format"="adm"));
create index age_index on Customers(age);
write output to nc1:"rttest/index_cust-index-age-nullable.adm";
for $c in dataset('Customers')
where $c.age < 20
order by $c.cid
return $c