Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello dear
I have a csv file that contains dynamique informations on header that we dont know number of line, and then i have columns like that :
line1 Country : French;
line2 Date : 27/04/2017;
lineN (Can be other informations)
lineN+1 ID;Product;Size;
lineN+2 1;TV;32;
lineN+3 1;Phone;N/A;
I want to keep just fields concerned ID,Product and size because i use them on a Tmap
Regards
Here is my proposal,
Initialize a boolean global variable:
Read the file with tFileInputDelimited.
Pass the rows to tJavaRow which to set "headerPassed" to "true" when needed:
Filter rows in tMap:
Here is the result:
Regards,
Here is my proposal,
Initialize a boolean global variable:
Read the file with tFileInputDelimited.
Pass the rows to tJavaRow which to set "headerPassed" to "true" when needed:
Filter rows in tMap:
Here is the result:
Regards,
Hi,
If you don't know header records count and still need to filter header records and load only valid data into target then try below. Here i assumed ID valid value is numeric.
In tMap, used filter condition based on ID is numeric. If it is numeric then pass else reject.
Mathematical.NUM(row1.ID)==1
Regards,
@vboppudi, Hazardous (IMHO) as you don't know what may arrive before the real header.
The solution I proposed works at any time (any rows number, any content).
@TRF I will test your solution, and i return,