GithubHelp home page GithubHelp logo

yshao0711 / talend-codegen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dgradl/talend-codegen

0.0 0.0 0.0 45.22 MB

Command line code generation (job export) plugin for talend

Makefile 2.84% Shell 17.25% Java 79.91%

talend-codegen's Introduction

talend-codegen

Command line code generation (job build/export) plugin for talend

Compiling & Configuring

Build:

#to build the latest version available
> make

#ls in the out directory
>ls jar/talend-codegen_5.6.0.jar

#build an older version
>make build_jar_5.4.1

#build directly with ant:
> cat Makefile
build_jar_5.6.0:
	ant build -Dtalend_version=5.6.0 -Dtalend_revision=20141024_1545
clean_5.6.0:
	ant clean -Dtalend_version=5.6.0 -Dtalend_revision=20141024_1545

#select your version
> ant build -Dtalend_version=5.5.1 -Dtalend_revision=r118616

And copy jar/talend-codegen<version>.jar to the plugins directory of Talend.

Usage with talend-codegen helper

This project is shipped with an helper script available in ./bin/talend-codegen.

This script must be modify to reflect your Talend installation (TALEND_DIR and TALEND_BIN at the beginning of the script)

Generation:

# create out directory
$ mkdir -p './out'

# With all '-need' options enabled 
$ talend-codegen -p './MyProjectDir/' -o './out/' -j './MyJobName' -a

# With custom options
$ talend-codegen -p './MyProjectDir/' -o './out/' -j 'MyJobName' -O '-needLauncher=true -needContext=true'

help:

# help
$ talend-codegen -h
usage: talend-codegen -p <project dir> -o <out dir> -j <job name> \
                    [-a] [-O <custom options>] [-T <talend dir>] [-c <comp dir>]

Build Talend project from command line

examples:
 * talend-codegen -p ./MyProjectDir/ -o out/ -j MyJobName -a
 * talend-codegen -p ./MyProjectDir/ -o out/ -j MyJobName -O '-needLauncher=true -needDependencies=true'

arguments:
  -p <project dir>: directory containing the talend project
  -j <job id>: job to export
  -o <out dir>: output directory

optional arguments:
  -a:                  enable all -need* options
  -O <custom options>: custom options (cannot be used with -a)
  -T <talend dir>:     talend install directory (default: /home/pcarpent/TOS_DI-r95165-V5.2.1)
  -c <comp dir>:       location of any custom components used in the job

codegen options (for -O):
 * -version - version of job to be exported
 * -needLauncher - include launcher script (true/false)
 * -needSystemRoutine - include system outines (true/false)
 * -needUserRoutine - and so on..
 * -needTalendLibraries
 * -needJobItem
 * -needSourceCode
 * -needDependencies
 * -needJobScript
 * -needContext
 * -applyToChildren

Usage invoking TOS directly

Invoke talend with the following mandatory command line arguments:

  • -projectDir - the project directory where the project can be found
  • -jobName - name of the job to be exported
  • -targetDir - the directory where the exported job will be placed

Eclipse application arguments

  • -application au.org.emii.talend.codegen.Generator - run the code generation plugin
  • -nosplash stops the display of the gui splash window
  • --launcher.suppressErrors stops errors being displayed in message boxes - output to stderr instead
  • -data specifies the talend workspace used for building the project - created automatically if it doesn't exist (recommended to ensure a clean build)
  • --clean_component_cache tells TOS to reload external components and rebuild the cache

Some optional command line arguments you can have:

  • -version - version of job to be exported
  • -componentDir - location of any custom components used in the job
  • -needLauncher - include launcher script (true/false)
  • -needSystemRoutine - include system outines (true/false)
  • -needUserRoutine - and so on..
  • -needTalendLibraries
  • -needJobItem
  • -needSourceCode
  • -needDependencies
  • -needJobScript
  • -needContext
  • -applyToChildren

Example:

export JOBNAME=MyJob
export WORKSPACE=/home/projectname/workspace
export PROJECTDIR=/home/projectname/workspace/MYPROJECT
export TARGETDIR=/home/projectname/workspace/.talend-build
export COMPONENTDIR=/home/projectname/custom_components

cp $PROJECTDIR/libs/* /home/TOS_DI-r118616-V5.5.1/lib/java/

/home/TOS_DI-20141024_1545-V5.6.0/TOS_DI-linux-gtk-x86_64 \
    -nosplash --launcher.suppressErrors -data $WORKSPACE \
    -application au.org.emii.talend.codegen.Generator \
    -jobName $JOBNAME -projectDir $PROJECTDIR \
    -targetDir $TARGETDIR -componentDir $COMPONENTDIR

talend-codegen's People

Contributors

kakwa avatar jonescc avatar peterstrapp avatar danfruehauf avatar bitdeli-chef avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.