North Concepts
home » data pipeline » getting started

Getting Started

Overview

This section discusses how to get your Data Pipeline application up and running quickly. It assumes a working knowledge of your development and execution environment--it does not cover how to configure your build system or IDE.

1. Download the software

2. Configure your Build and Classpath

Add the following jars (distributed with Data Pipeline) to your classpath:

  • NorthConcepts-DataPipeline.jar
  • antlr-2.7.5.jar
  • poi-3.0-alpha2-20060616.jar
  • poi-contrib-3.0-alpha2-20060616.jar
  • poi-scratchpad-3.0-alpha2-20060616.jar
  • jxl.jar

3. Compile and run your program

Compile and run your own program or copy the example below. Remember to replace "credit-balance.xls" with the path to your own MS Excel spreadsheet and "credit-balance" with the name of one of it's worksheets (tabs).

/*
* Copyright (c) 2006-2008 North Concepts Inc.  All rights reserved.
* Proprietary and Confidential.  Use is subject to license terms.
*
* http://northconcepts.com/data-pipeline/licensing/
*
*/
package com.northconcepts.datapipeline.examples.cookbook;

import java.io.File;

import org.apache.log4j.Logger;

import com.northconcepts.datapipeline.core.DataEndpoint;
import com.northconcepts.datapipeline.core.DataReader;
import com.northconcepts.datapipeline.core.Record;
import com.northconcepts.datapipeline.excel.ExcelDocument;
import com.northconcepts.datapipeline.excel.ExcelReader;

public class ReadFromAnExcelFile {

   
public static final Logger log = DataEndpoint.log;

   
public static void main(String[] args) throws Throwable {
       
ExcelDocument document = new ExcelDocument().open(new File("credit-balance.xls"));
        DataReader reader =
new ExcelReader(document)
           
.setSheetName("credit-balance")
           
.setFieldNamesInFirstRow(true);

        reader.open
();
       
try {
           
Record record;
           
while ((record = reader.read()) != null) {
               
log.debug(record);
           
}
        }
finally {
           
reader.close();
       
}
    }
}

4. Browse the examples

You can find the above example, along with many more, in the examples section.

 

Quick Links Documentation Contact
© 2007, 2008 North Concepts Inc.   All rights reserved.