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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help filtering and transforming data

I have data in 2 txt files in which I am trying to have Talend sort through a file of data according to the position of data  and then filter the Variable names into being columns in an output file.

 

For example

 

File 1

Position Variable

1- 2 FIPS State code (00 for US record)
4- 6 FIPS county code ( 0 for US or state level records)

8- 15 Estimate of people of all ages in poverty
17- 24 90% confidence interval lower bound of estimate of people of all ages in poverty

 

File 2

42 9 5864 4819
42 11 47405 42354

 

In which the position from file 1 corresponds to the number each digit represents in file 2.

 

Please help

Labels (2)
15 Replies
akumar2301
Specialist II
Specialist II

It is not very clear. Please explain the relation between file1 and File2 with example and your expected output.

Anonymous
Not applicable
Author

File 1 has text that explains what the data that is stored in file 2 means.

 

I want to create a solution that integrates the two files into 1 output file that will make it easier to understand the data. 

I am trying to output a file couples both of these functionalities. 

 

Attached is my file 1 and file 2 in separate excel sheets. 


SourceData.xlsx
akumar2301
Specialist II
Specialist II

so you want e.g. for

 

        1-  2    FIPS State code  (00 for US record)
        4-  6    FIPS county code ( 0 for US or state level records)

 

you want output as 

 

FIPS State code  (00 for US record);FIPS county code ( 0 for US or state level records);................................

42;0;..................

42;1;..................

43;132;..................

Anonymous
Not applicable
Author

Yes
akumar2301
Specialist II
Specialist II

Can you send me two txt file . Excel is not working 

 

Step 1 )

You need to parse 1st file 

output will be 

StartPosition;EndPosition;FiledValue 

 

Step2) 

Get the postionlength ( EndPosition- Prev record end position)

Length;FieldValue

 

Step3)

Denomalise both value

Step4) List of FiledValue should be written to fileOutput 

Step5) List of Length to globalVar "Pattern"

Step6) use above pattern in tFileInputPositional for File2 and output to  fileOutput 

 

 

akumar2301
Specialist II
Specialist II

attaching a sample job which could help to start.

 

change tSetGlobalVar


testpositional_0.1.zip
Anonymous
Not applicable
Author

How do I open the project that I downloaded from you with my Talend studio?

Anonymous
Not applicable
Author

tried running job and got this in console


Screen Shot 2019-04-17 at 5.00.47 AM.png