Clarity

  • 1.  GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    Hi  I'm trying to read all Project IDs (just project IDs separated by comma) from a .txt file.  I think, the FOR LOOP is not working correctly.    What am I doing wrong?    Here is the .txt file:  10001,10002,10003.....  Here is my code:    
     
     
     
     
     
     
     
         
       
       
     
     
       
       
     
        ${row[0]}
       
       
       
       
       
       


  • 2.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    The GEL doesn't immediately look wrong....  but the "delimiter" is only important for different fields in a single record; your input file is different records so the delimiter actually should not matter at all....  What gel:out output do you get?    


  • 3.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    When I type "gel test.xml" at the command prompt, I get only  the following message:     It did not go through the for loop and the output is not displayed.


  • 4.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    It looks like your GEL is outputing the GEL script rather than running it!   (Since you only output is a line from your GEL code?)  Weird - a problem in how you are running the GEL perhaps?   Maybe put a few proper gel:out statements in there to check its working (at all!)


  • 5.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    I added Gel OUT statements before and after for statement. it works.   The only gel statement within FOR LOOP are not working.   Any idea?


  • 6.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    Just a guess, but the word 'row' that you're attempting to use as a variable may be reserved.   Have you tried a variable name change to prevent confusion?  
    ${infileParsed_row[0]}
     


  • 7.  Re: GEL - Read data from CSV file

    Posted Oct 12, 2010 07:08 AM
    You have a typo in your xmlns declaration.  xmlns:file="jelly.com.niku.union.gel.FileTagLibrar   y"  should be  xmlns:file="jelly:com.niku.union.gel.FileTagLibrar   y"  Note the colon after jelly.