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

Read from a fixed length file with different data types

Is there a way to read from a file that has the data stored as hex but of different data types?

For example a row may have something like:

4 byte Integer

20 byte string

8 byte floating point number

 

I would need to define the first 4 bytes as an integer, the next 20 as a string, and next 8 as a float.

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

2 Replies
Anonymous
Not applicable
Author

Hi there,

 

it seems that you need to look at tFilePositional. You will define the size of each field and apply the type after.

 

You shouldnt have to worry about the Hex factor. If you really need translation from a weird encoding, the best would be to extract everything as a String and then use a tMap to convert the data as it should.

 

Cheers,

manodwhb
Champion II
Champion II

@cjjohna,check the below link to know how to use tFilePositional.

 

https://help.talend.com/reader/NNO~fmVQU4rlkF9Depfdxw/NPwSLaWUrdjCxpsENf7fPw