Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ignore Header information on CSV

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

 

 

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Here is my proposal,

0683p000009Lttv.png

 

Initialize a boolean global variable:

0683p000009Ltk3.png

 

Read the file with tFileInputDelimited.

Pass the rows to tJavaRow which to set "headerPassed" to "true" when needed:

0683p000009LtgY.png

Filter rows in tMap:

0683p000009LtwB.png

Here is the result:

0683p000009Ltdu.png

 

Regards,

 

View solution in original post

6 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Hi,

What is your question here?

Regards,
TRF
Champion II
Champion II

Here is my proposal,

0683p000009Lttv.png

 

Initialize a boolean global variable:

0683p000009Ltk3.png

 

Read the file with tFileInputDelimited.

Pass the rows to tJavaRow which to set "headerPassed" to "true" when needed:

0683p000009LtgY.png

Filter rows in tMap:

0683p000009LtwB.png

Here is the result:

0683p000009Ltdu.png

 

Regards,

 

vboppudi
Partner - Creator III
Partner - Creator III

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.

 

0683p000009LtOH.png

 

In tMap, used filter condition based on ID is numeric. If it is numeric then pass else reject.

Mathematical.NUM(row1.ID)==1

 

Regards,

 

TRF
Champion II
Champion II

@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).

 

Anonymous
Not applicable
Author

    @TRF  I will test your solution, and i return,

Anonymous
Not applicable
Author

@vboppudi ID is alphanumeric