Examples >

Compile and Run a Job

Data Pipeline jobs are plain old Java classes, they can be compiled and ran in exactly the same way. Add them to your IDE, ANT build, or command line as you would any other class.

If you're using the built-in expression language, remember to add the ANTLR jar (antlr-2.7.5.jar) to the classpath when running. If you're using Excel then add the JExcelApi jar(jxl-2.6.12.jar) and/or the POI jars:

  • dom4j-1.6.1.jar
  • poi-3.8-20120326.jar
  • poi-excelant-3.8-20120326.jar
  • poi-ooxml-3.8-20120326.jar
  • poi-ooxml-schemas-3.8-20120326.jar
  • poi-scratchpad-3.8-20120326.jar
  • stax-api-1.0.1.jar
  • xmlbeans-2.3.0.jar


Given the following Data Pipeline job to convert a CSV file to fixed-width.

 * Copyright (c) 2006-2018 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 com.northconcepts.datapipeline.core.DataReader;
import com.northconcepts.datapipeline.csv.CSVReader;
import com.northconcepts.datapipeline.fixedwidth.FixedWidthWriter;
import com.northconcepts.datapipeline.job.Job;

 * Compiling and running a job is the same as for any other java class:
 * Compiling:   javac -classpath NorthConcepts-DataPipeline.jar CompileAndRunAJob.java
 * Running:     java -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-2.6.3.jar;itext-2.0.5.jar CompileAndRunAJob
public class CompileAndRunAJob {

    public static void main(String[] args) {
        DataReader reader = new CSVReader(new File("example/data/input/credit-balance-01.csv"))

        FixedWidthWriter writer = new FixedWidthWriter(new File("example/data/output/credit-balance-02.fw"));

        Job.run(reader, writer);


Compile it on the command line with javac.

javac -classpath NorthConcepts-DataPipeline-4.3.1.jar CompileAndRunAJob.java


After compilation, run it by calling java.

java -classpath NorthConcepts-DataPipeline-4.3.1.jar CompileAndRunAJob

If the job uses Excel or the expression language, add their jars to the classpath.

java -classpath NorthConcepts-DataPipeline-4.3.1.jar;antlr-2.7.5.jar;dom4j-1.6.1.jar;poi-3.8-20120326.jar;poi-excelant-3.8-20120326.jar;poi-ooxml-3.8-20120326.jar;poi-ooxml-schemas-3.8-20120326.jar;poi-scratchpad-3.8-20120326.jar;stax-api-1.0.1.jar;xmlbeans-2.3.0.jar;jxl-2.6.12.jar CompileAndRunAJob
Mobile Analytics