Customer Portal

Running CloverETL from Java

Comments 14

  • Avatar
    jausperger
    0
    Comment actions Permalink
    Hi,

    all related informations are on websides:

    http://wiki.clovergui.net/doku.php
    http://wiki.clovergui.net/doku.php?id=running
    http://wiki.clovergui.net/doku.php?id=examples

    you need at least java 1.5 version and cloverETL tool.

    http://www.cloveretl.org/download/clove ... -2-1-3.zip

    Regard,

    ja
  • Avatar
    jausperger
    0
    Comment actions Permalink
    Hi,

    maybe I wrong understood the question. Of course you can run graph from java, some examples how to run cloverETL graph from java, can be found in

    http://www.cloveretl.org/download/examp ... -2-1-1.zip
    cloverExamples.rel-2-1-1.zip/cloverETL/examples/javaExamples

    I recommend to see testGraphSort.java. You can inspire with runGraph.java which is a main class that runs clover ETL graphs.

    Basic informations are on wiki pages http://wiki.clovergui.net/doku.php?id=t ... on_concept

    Regard,

    ja
  • Avatar
    bcervante2007
    0
    Comment actions Permalink
    Hello jausperger:
    In spite of having visited the connections I continue with the doubt, me pregonto if maybe you could give me a bigger explanation, and to give me an example.
    It is that I am new working with the CloverETL, and dont know a lot.
    If you have something that can serve it you can send to: bcervante@estudiantes.uci.cu
    Muchas gracias.

    It excuses any error in the writing, English is not my language.

    Greetings:
    Betty.
  • Avatar
    jausperger
    0
    Comment actions Permalink
    Hello,

    there are 2 ways how to import clover etl project without gui. The site "http://www.cloveretl.org/download/clover-etl/" contains some releases and source codes.

    1) If you want to use or re-extend clover etl faetures, please use the release. There are jars files which add to your project. You can write even own components. It is very easy. Download cloverETL.rel-2-3-x.zip and create new java project and add all jars from zip to java-build-path in a project properties folder. And then you can use some example in javaExamples...

    2) If you want to make deep changes then there is better to use source codes. You have to create several project, each for plugin and one for engine and you have to copy src directories from zip(and relevant plugin) to your source project directries. And then you must to set the class paths.

    ja
  • Avatar
    crazybird
    0
    Comment actions Permalink
    We are thinking about using CloverETL within our projects in java.

    Unfourtunately the examples like here http://wiki.clovergui.net/doku.php?id=t ... on_concept are oudated. They are using deprecated methods and there are always missing some details so that just simple "copy-and-paste" wouldn't work.



    In general I think that there is not enough docuemntation for JasperETL, also there are too less java- examples compared to the many XML- bases ones.

    It would really help to have some COMPLETE (in full java code) examples using best practises.
  • Avatar
    jurban
    0
    Comment actions Permalink
    Hi!
    thank you for your interest in Clover. We will update the Java Clover examples so they work with the newest Clover and then we'll let you know.

    Jaro
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    >>We will update the Java Clover examples so they work with the newest Clover and then we'll let you know.

    Are there any updated examples of this available?

    I am completely new at this - have used CloverETL designer frequently on my local PC but this is my first time trying to execute a graph on a remote Linux box from a command line. I have downloaded the CloverETL engine to my local PC, and want to understand how to do this step-by-step, for example:

    1) I assume that I need to unzip the CloverETL engine file on my local PC and then copy the extracted folders/files to the remote Linux computer. If so, to where? See attached screen print of the folder structure on the remote Linux computer.
    2) Do I need to update any Linux environment variables, e.g. PATH?
    3) I have created a simple graph on my local PC; where do I copy the file to on the remote Linux computer?
    4) What is the basic syntax to execute the graph that I have copied to the remote Linux computer?
    5) How do I structure the execution statement to pass parameters to the graph to specify the source and target file(s)?

    Once I understand these basic questions, I believe I can continue from there.

    Thank you.
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Marlon,

    I am afraid that there is no up-to-date documentation on topic of running Engine.

    1) Engine does not care of location of installation. Good place for such software is /opt on linux systems.
    2) No need to update ENV variables if you will execute Engine by full path.
    3) Yes just copy your graphs, you may pick arbitrary folder.
    4) Try to run shell script cloverETL/bin/clover from unzipped engine on your linux machine to see description of command line parameters.
    5) Same as 4)

    I hope this helps.
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    Hi Jaroslav,

    Your suggested instructions have helped me, yes.

    I have not completed this successfully yet, but I am getting closer. Very close, I believe!

    When I try to run the conversion using the following command:

    ~/opt/cloverETL/bin/clover runGraph -plugins ~/opt/cloverETL/plugins ~/opt/cloverETL/graph/web.grf

    ...then the result is what is captured in the attached text file (CloverETL.log). Can you advise how to correct this error? Note that I am correctly specifying the full path whenever I can to hopefully avoid any problems.

    Thank you.
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi,

    You can take a look here viewtopic.php?f=4&t=6803&p=10948&hilit=contexturl#p10948

    It is windows sample, but work under linux in similar way, so:


    /opt/cloverETL/clover -contexturl "/opt/cloverETL" graph/web.grf


    But that means your workspace.prm is located at /opt/cloverETL/workspace.prm. That is not recommendable structure. I would recommend you:

    * store graphs in different directory than Engine, eg. /opt/etl_graphs
    * for each project create separate directory, eg. /opt/etl_graphs/hello_world
    * in project directory should be files/directories you know from Designer - workspace.prm, graphs/web.grf, data-in/sample.txt, ...

    Then your execute statement would be:


    /opt/cloverETL/clover -contexturl "/opt/etl_graphs/hello_world" graph/web.grf


    I hope this helps.
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    Thank you :)

    I made the changes that you suggested, and I was able to successfully execute a basic graph from the command line using the following statement:

    /root/opt/cloverETL/bin/clover -contexturl "/root/opt/etl_graphs/web_graph" graph.web.grf

    Now I can try to build on my success from here. Once again, thank you for your assistance!
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    Hi Jaroslav, et al

    I have a follow-up question.

    I am now executing a graph that includes a "Class", but when I execute the graph, I am getting an error, "Cannot find class", with the name of the class cited.

    I have tried to replicate the location of the file on my local machine on the machine with the Clover Engine, but I am still getting the error. Can you advise where I should place the file(s)?

    I have attached screen prints of the error that I am receiving, along with screen prints to illustrate the location of the files on my local machine and on the machine with the Clover Engine.

    Thank you.

    Marlon
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    Hi Jaroslav,

    Attached are three additional screen prints to illustrate the location of the files on the machine with the Clover Engine; this is the machine that is giving me the error. Since I am limited to three attachments to an individual post (and cannot load a .doc or .pdf file with all the screen prints in a single file), I have added these in a subsequent post here.

    Thank you.

    Marlon
  • Avatar
    marlon4x
    0
    Comment actions Permalink
    Hi Jaroslav, et al,

    Just following up on my question here, I do not see a reply - can you advise?

    Thank you.

    Marlon

Please sign in to leave a comment.