• Index
  •  » Talend Open Studio for Data Integration » Installation
  •  » tRowGenerator and routines

#1 2007-05-28 18:49:42

denis
Member
Company: Freelancer
Registered: 2006-12-04
Posts: 137
Website

tRowGenerator and routines

Hello

I create a routine and I would like to use it in tRowGenerator in the function field like the sequence,getRandomDate,replaceSpecialCharForXML  routines

the probleme is the routines that I have already created is not referenced in the function routines fields in the tRowGenerator

Could some one can help me?

DN

Offline

#2 2007-05-29 09:23:07

fatbobman
New member
Registered: 2007-05-29
Posts: 2

Re: tRowGenerator and routines

same question for me.

Offline

#3 2007-05-29 10:39:53

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: tRowGenerator and routines

You have to use "sequence" method header as a template for your routine. Once the method header follows the template, it will automatically be available in method list of tRowGenerator depending of the column type.

Offline

#4 2007-05-29 10:52:53

mhirt
Talend team
Registered: 2006-09-19
Posts: 1802

Re: tRowGenerator and routines

Hello

You can do this by adding the Talend formatted JavaDoc comments to your method.
Have a look at the existing System Routines for examples.

After development of your routine, you may have  to restart Talend Open Studio to see it in the tRowGenerator.

Best Regards,
Micha√ęl.

Offline

#5 2007-05-29 10:56:37

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: tRowGenerator and routines

mhirt wrote:

After development of your routine, you may have  to restart Talend Open Studio to see it in the tRowGenerator.

Having to restart is a bug that should have been corrected, see [Bugtracker, bug 605, fixed] [tRowGenerator] live refresh on user routine

Offline

#6 2007-05-29 13:57:07

denis
Member
Company: Freelancer
Registered: 2006-12-04
Posts: 137
Website

Re: tRowGenerator and routines

All

Hello
Here my routines  and is still doesn't work event I restart Talend
can you help me to make it work

*********************************************************
package routines;


import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.FileNotFoundException;


public class ChangeFile{
   
   
   
     public static String filebyte(String message)
      {
          
          File file = new File(message);
        
              FileInputStream fileInput;
            try
            {
               
                fileInput = new FileInputStream(file);
                InputStream input = new DataInputStream(fileInput);
                
                // int byt;
                 //while ((byt = input.read()) != -1) {
                    
                 //      System.out.println(byt);
                //}
return input.toString();
                // System.out.println(input);
                  
            }
            catch (FileNotFoundException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
                return e.toString();
            
            }
            //catch (Exception exp){
                // 
            //  }
           
        
     }
}

**************************************************

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Installation
  •  » tRowGenerator and routines

Board footer

Powered by FluxBB