| drop dataverse fuzzyjoin if exists; |
| |
| create dataverse fuzzyjoin; |
| |
| use dataverse fuzzyjoin; |
| |
| create type DBLPType as open { |
| id: int32, |
| dblpid: string, |
| title: string, |
| authors: string, |
| misc: string |
| } |
| |
| create type CSXType as open { |
| id: int32, |
| csxid: string, |
| title: string, |
| authors: string, |
| misc: string |
| } |
| |
| create dataset DBLP(DBLPType) primary key id; |
| create dataset CSX(CSXType) primary key id; |
| |
| load dataset DBLP |
| using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| (("path"="nc1://data/pub-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":")); |
| |
| load dataset CSX |
| using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| (("path"="nc1://data/pub-small/csx-small-id.txt"),("format"="delimited-text"),("delimiter"=":")); |
| |
| write output to nc1:'rttest/fuzzyjoin_dblp-csx-dblp-aqlplus_1.adm'; |
| |
| set simthreshold '.5f'; |
| |
| for $dblp in dataset('DBLP') |
| for $csx in dataset('CSX') |
| for $dblp2 in dataset('DBLP') |
| where $dblp.title ~= $csx.title and $csx.authors ~= $dblp2.authors |
| order by $dblp.id, $csx.id, $dblp2.id |
| return {'dblp': $dblp, 'csx': $csx, 'dblp2': $dblp2} |