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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reading data from unstructured File

Hello All,

 

I have a file like below which is un structured. The real data starts from line number 10. We can use tfileinput delimiter for that with having header as 10. But i would like to take the values which is right to "Game DATE" and "TRIG: CO." . These are in line numbers 6 and 8. I need to take those values and have them as two fields along with the actual data set, whcih starts form Line number 10. Kindly advise on this. 

 

"SSG TRIG: S81GS146"
"END GAME"
"Player Place - NY"

" Game DATE:","11/27/2018"
"CURRENT DATE:","11/27/2018"

"TRIG: CO.  (TEAMS)"
"TEAM", " T1 ","T2 "," EXC "," TYEN "," "
"NO. "," SWQ ","SDD "," TIONS "," TIONS "," FINAL "
"S1 ",    80.00 , 000.00 , 000.00 ,   000.00 ,   000.00
"S2 ",    70.00 , 000.00 , 000.00 ,   000.00 ,   000.00

 

 

Output I required should be of below format.

"Game DATE" "TRIG: CO." "NO. "," SWQ ","SDD "," TIONS " ," TIONS ", " FINAL "
"11/27/2018,            81,         "S1 ",80.00 ,   000.00 ,  000.00 ,   000.00 ,   000.00
"11/27/2018,            81,         "S2 ",70.00 ,   000.00 ,  000.00 ,   000.00 ,   000.00

Labels (2)
7 Replies
David_Beaty
Specialist
Specialist

You'll probably need two hits at reading the data in, firstly reading full row, for 1 rows. Inspect each line and extract data if its what you want. secondly, for the data rows, with a header size of 10 to skip the "header".

 

Thanks

 

David

Anonymous
Not applicable
Author

Hello,

Here is a TalendHelpCenter:tFileInputRaw in talend which reads all data in a raw file and sends it to a single output column for subsequent processing by another component.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi ,

 

May i know what component we can use to read data from Raw input, because I have consider two rows in the incoming files as tow columns . 

Anonymous
Not applicable
Author

Hi David, thanks, can you please help me more with inspect each lines and extract . The second option I have done already and its is bringing the data to my output. But the first part , I am still not able to achieve. Kindly help. 

Anonymous
Not applicable
Author

Hello,


@ris.tan wrote:

Hi ,

 

May i know what component we can use to read data from Raw input, because I have consider two rows in the incoming files as tow columns . 


Is this tfileinputraw component OK with you?

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi Sabrina,

 

I am able to take all the data into one column, but how I have to split it in different columns, is what confusing. Since im yet to explore Talend much, i am not able to proceed further. 

 

Regards,

MS

David_Beaty
Specialist
Specialist

Hi,

 

Use something like:

 

tFileInputFullRow (read in only the 1st 10 rows ) ->tJavaRow - if this rows contains text of interest, extract & place into global map.

V

tFileInputDelimted (skip 1st 10 rows) -> tJavaRow (add in columns of interest values from previous step) -> more stuff