Talend/Java newbie so I am sure this is a problem of basic understanding -- thanks in advance for your help.
I am just learning Talend so my first job is a basic one but causing me trouble.
- downloading Football schedule .csv file from the internet using tFileFetch:
http://www.repole.com/sun4cast/stats/cfb2011lines.csv - tFileInputDelimited (pic attached) using CFBMetadata file I created
- tFileOutputExcel output file
Couple of problems.
1) it appears that even though I am downloading the file using tFIleFetch tFileInputDelimited is just passing along the data in the metadata file I have defined not the .csv file I downloaded. I got this job structure from one of the tutorials so I thought it was right, but apparently not.
2) I am only getting 42 rows when I run the job because it is giving me an empty string or For Input String " " error on the rows that have an empty value in the incoming CSV file. There is obviously some issue with the columns that I have defined as int's and floats in the metadata being treated improperly, but I don't know how to accommodate for that. I have tried several expressions to catch these, but to no avail.
thanks for the help.
Hi,ClintMc Thanks for using The talend, from your description i got that you want to use 3 components to finish the flow of data -tFileFetch -tFileInputDelimited using CFBMetadata file - tFileOutputExcel output file First, for the compont -tFileFetch you can see the pic attachment i have add. there are some hint in the pic Second, from the Repository, and find the metadata--Filedelimited. Right click and create a new file delimited. In the wizard, you can upload the file you have got by the -tFileFetch. the hint also have been marked in the following pic Third,drag the metadata we have created before, (we called cfb2011lines) into the job designer and make a row1 with the tFileOutputExcel. I'm afriad that you are newbie cannot catch me, so i provide the detailed pic to you to understand that. Hope it will help you. BTW, for the issue of or Input String " " error , there must be something wrong in the schema. If you using CFBMetadata file , the schema should be set by default.
Hi,ClintMc And for your issue(your pic attached), we point out where you make a mistake and give the description in the following pic. To reslove the problem, read the Line column as string type, and then convert the value to null or 0 if it is a empty string " " on tMap. please see my screenshot
valueOf worked like a charm on the float but I can't get it to compile on an Integer (row1.Visitor_score), which in the 2012 schedule has some zeros; am I doing something else wrong?
The Test! button in Expression Builder doesn't work; you need to actually run the job. As long as row1.Visitor_Score is in the correct format for an integer it should be fine, although Integer.parseInt is more efficient than Integer.valueOf.