blob: cf8aacffc161e1839d06eac88c115acf8a8bcf50 [file] [log] [blame]
use dataverse demo1112;
declare type CustomerType as closed {
cid: int32,
name: string,
budget: int32,
age: int32?,
address: AddressType?,
lastorder: {
oid: int32,
total: float
}
}
declare type AddressType as open {
number: int32,
street: string,
city: string
}
declare nodegroup group1 on nc1, nc2;
set format "edu.uci.ics.asterix.runtime.formats.nontagged.NonTaggedDataFormat";
declare dataset Customers(CustomerType)
primary key cid on group1;
write output to nc1:"/home/yasser/Dropbox/Research/data/results/result_cust_3.adm";
for $c in dataset('Customers')
return $c
/*
for $c in dataset('Customers')
let $c1 := int8("80")
let $c2 := int16("160")
let $c3 := int32("320")
let $c4 := int64("640")
let $c5 := float("-80.20")
let $c6 := double("-20.56")
return {"id": $c.cid, "int8": $c1,"int16": $c2,"int32": $c3, "int64": $c4, "float": $c5, "double": $c6}
*/