Warning: Cannot modify header information - headers already sent by (output started at /home/www/talendforge.org/forum/viewtopic.php:1) in /home/www/talendforge.org/forum/header.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home/www/talendforge.org/forum/viewtopic.php:1) in /home/www/talendforge.org/forum/header.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /home/www/talendforge.org/forum/viewtopic.php:1) in /home/www/talendforge.org/forum/header.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/www/talendforge.org/forum/viewtopic.php:1) in /home/www/talendforge.org/forum/header.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /home/www/talendforge.org/forum/viewtopic.php:1) in /home/www/talendforge.org/forum/header.php on line 20
tRowGenerator and routines (Page 1) / Installation / Talend Community Forum
 

You are not logged in.

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

denis
Member
137 posts

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 08:23:07

fatbobman
Member
2 posts

Re: tRowGenerator and routines

same question for me.

Offline

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

plegall
Member
1586 posts

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 09:52:53

mhirt
Talend Team
1835 posts

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 09:56:37

plegall
Member
1586 posts

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 [Bug] 605

Offline

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

denis
Member
137 posts

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

Board footer