Maybe to solve your problem we have to restart completely the analyse of your job, please answer to the following questions:
how many column have you xls file?
Did you have a look to plegall links?
Where do you want to put the value of your 3 cells?Do you want to put them in the same DB rowor in 3 different rows? What is your target fields name?
I'll do your job completely tomorrow
thank u very much.
My purpose is to extract data from cells(B9 contain the name of activity,B8 contain the name of the project,K22 contain le nombre de non conformite and J7 contains the date) from different files excel that have the same format.then i want to put these all data in a table "audit" that has this syntax:
CREATE TABLE `staging_area`.`AUDIT` (
`ID_AUDIT` VARCHAR(30) NOT NULL default '',
`NON_CONFORMITE` NUMERIC NOT NULL default '0',
`ACTIVITY_NAME` VARCHAR(30) NOT NULL default '',
`DATE_AUDIT` DATE NOT NULL DEFAULT 0,
PRIMARY KEY(`ID_AUDIT`)
);
ID_AUDIT will have the value of B8,NON_CONFORMITE will contain the value of K22,ACTIVITY_NAME will contain the value of B9,DATE_AUDIT will contain the value of J7 as if i did an insert in the table audit.then i will use this table as a dimension and other tables to generate report.
the columns of the file are(A,B,C,E,F,G,H,I,J,K)
The data extracted from the same file will be in the same row :example("XX",5,"YY","12/10/2007"),(XX,5,YY and "12/10/2007") are in the same file.
It did not work
i have this error message
Warning: Usage of a local non-builtin name
NumberFormatException For input string: "23/12/07"
NumberFormatException For input string: "Duration in h: "
The cell format is not Date in row 11 column 9
The cell format is not Date in row 12 column 9
The cell format is not Date in row 13 column 9
The cell format is not Date in row 14 column 9
The cell format is not Date in row 15 column 9
NumberFormatException For input string: "PR.MA.01"
The cell format is not Date in row 17 column 9
The cell format is not Date in row 18 column 9
The cell format is not Date in row 22 column 9
The cell format is not Date in row 35 column 9
Exception in component tAggregateRow_1_AGGOUT
java.lang.NumberFormatException: NumberFormatException For input string: "null"
at routines.system.ParserUtils.parseTo_float(ParserUtils.java:68)
Ok I know where your problem comes from, put your colomn J format to String in your tfileExcel and change the code of the tjavarow to : int seq= Numeric.sequence("topic970",1,1); if (seq == 7) { output_row.J7 = TalendDate.parseDate("dd-MM-yyyy",input_row.J); } if (seq == 😎 { output_row.B8 = input_row.B; } if (seq == 9) { output_row.B9 = input_row.B; } if (seq == 22) { output_row.K22 = input_row.K; }
you have to let the J7 format in the output schema to Date, you just have to change the input schema and the tfileExcelinput schema J to String If you use the new code of tjavarow you will convert the string to a date
this exactly what i did i put J7 format to date but i get this msg
NumberFormatException For input string: "23/12/07"
NumberFormatException For input string: "Duration in h: "
Exception in component tJavaRow_1
java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
23/12/07 is in J7
Duration in h: is in J8