/* scan and print an ADM file as a dataset of closed records */ | |
drop dataverse test if exists; | |
create dataverse test; | |
use dataverse test; | |
create type DBLPType as closed { | |
id: int32, | |
dblpid: string, | |
title: string, | |
authors: string, | |
misc: string | |
} | |
create dataset DBLPadm(DBLPType) | |
partitioned by key id; | |
// drop dataset DBLPadm; | |
load dataset DBLPadm | |
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" | |
(("path"="nc1://data/dblp-small/dblp-small.adm"),("format"="adm")); | |
write output to nc1:"rttest/scan_20.adm"; | |
for $paper in dataset('DBLPadm') | |
order by $paper.id | |
return $paper |