Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Friday, March 25, 2011

[TUTORIAL] Component Designer in Talend Open Studio

This tutorial is essential for new Talend Open Studio component developers. It shows how to use Open Studio's Component Perspective to rapidly build and test custom components.

15 comments:

  1. I have a question: I put 'System.out.println("this is begin/main/end");' in javajet files. And push component to a pallete. There was no bad messages. And add this component to job and start the job and no message appear in console. I looked at java code of job - there was now addition code in a place there should be. Reopen job and TOS didn`t help. I looked at different sources - there was no such problem. Any idea, please?

    ReplyDelete
    Replies
    1. Hi Igor,

      Are you putting your System.out call in a scripting element (<% %>)? If so, move it out of the brackets.

      <% String s = "carl"; %>
      System.out.println("s=<%= s %>");

      Delete
    2. This comment has been removed by the author.

      Delete
    3. Hi, Carl. I tried both inside and outside of brackets. It doesn`t work at all. Is there a mechanism in TOS to see the adding code in Job? And what else could be wrong? Maybe i should change some properties in XML file?

      Delete
    4. Can you try adding the code from the 12/24/2012 08:47 comment to the begin javajet? You should a System.out.println in the Code tab of the job when you add the component. Note that the System.out.println is printing more than a JET expression. It will print "s=" if the JET expression is empty.

      Delete
    5. It doesn`t work. Again. I can show the screen in skype, if you doesn`t mind. My skype name "anteastra". Sorry for late dialog. In our country is morning now

      Delete
    6. Thanks for trying help. Merry Cristmas! :)

      Delete
    7. Try to change STARTABLE="false" to STARTABLE="true"
      in xml file
      By default STARTABLE="false"


      Delete
  2. Hi Bekwam, thought this is a better place to continue my questions than on YouTube. Thanks in advance

    My tTutorial1_begin.javajet is extremely simple:

    <%@ jet %>
    <%
    System.out.println("begin");
    %>

    The generated java class generate() mtd:

    public String generate(Object argument) {
    ...
    System.out.println("begin");
    ...
    }

    But when I run the job I don't see the text "begin" in the Execution console. what more must I set in TOS?

    ReplyDelete
    Replies
    1. Try pulling the System.out.println outside of the <% %>.

      I'm not sure where the output goes during the JET compilation process. You're limited as to what you can put in between the tags for JET generation purposes. A full Java program (classpath, etc) isn't readily available.

      Your system output should show up when you run the job.

      For this reason -- troubleshooting JET code -- I try to pack as much into a Java class as possible. See the Talend component tScriptRules and tScriptRulesLoad on the exhange as examples.

      If you don't feel like downloading the code right now, check out this blog post

      http://bekwam.blogspot.com/2012/12/dependency-injection-and-talend-open.html

      Delete
    2. update! update! update! the issue was that I was running JDK 1.7 with the Compiler compliance level set to 1.6! I did a search and could not find any .class files relating to my component. It never generated in the first place!

      I downloaded JDK 1.6_43, updated the installed JREs and all fixed. job is now printing "begin" in the Execution console

      Thanks for all your help B! may you have 100 cattle and 5 wives!

      Delete
  3. How to make java class file into Talend component and use it in the mappings.Can any one help me with that??

    ReplyDelete
  4. You'll find a lot of tutorials on component design on this blog, but they're somewhat fragmented. PowerUp Tutorials is a better example of the entire development process: http://powerupbi.com/talend/componentCreation_1.html#.

    ReplyDelete
  5. Hi ,
    I want to create a custom component usable for spark Bigdatabatch job .
    I am able to create component and it is pushed to pallet .
    But it is appearing in standard job .
    I want to use /move it to spark Bigdatabatch job please help

    Thanks
    Anuj sen

    ReplyDelete