blob: 83a72ee6bece1f806ec771494c6c52e3f3a505fb [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 closed {
cid: int32,
name: string,
cashBack: int32,
age: int32?,
address: AddressType?,
lastorder: {
oid: int32,
total: float
}
}
create external dataset Customers(CustomerType)
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/nontagged/customerData.json"),("format"="adm"));
write output to nc1:"rttest/custord_customer_q_01.adm";
for $c in dataset('Customers')
return $c