/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
use dataverse fuzzy1;

declare type DBLPType as open {
 id: int32,
 dblpid: string,
 title: string,
 authors: string,
 misc: string
}

declare nodegroup group1 on rainbow-01, rainbow-02, rainbow-03,
rainbow-04, rainbow-05;

declare dataset DBLP(DBLPType)
 primary key id on group1;

load dataset DBLP 
using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="rainbow-01:///home/hyracks/demo-data/dblp-id.txt"),("format"="delimited-text"),("delimiter"=":") pre-sorted;
