Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Making this .txt readable for Qlikview

Hey guys, I have this .txt file that is a bit different the extraction for qlikview to read it as a database. In order to become a database, I managed this by using the fill out in the transformation step, but i wonder if there is a better way of doing it, easier one...

Please, check it out the .txt file, try to load it in the qlikview, and tell me if there is a better way than using the fill out step.

Thank you,

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Depending on what you want to wind up with, one approach may be:

Raw:

LOAD @1,

    @2,

    @3,

    @4

FROM

[My restaurant.txt]

(txt, codepage is 1252, no labels, delimiter is '\t', msq, header is 0 lines, filters(

Replace(1, top, StrCnd(null))

));

Menu:

LOAD

  if(@2='',peek('Course', RowNo()-2), @2) as Course,

  if(@3='',peek('Dish', RowNo()-2), @3) as Dish,

  @4 as Ingredient

RESIDENT Raw

WHERE @1 = 'Menu'

;

And then do the same for Foods and Ingredients as I did for menu.

-Rob

View solution in original post

3 Replies
amit_saini
Master III
Master III

Hi Julio,

Please see the attachment.

Thanks,

AS

vikasmahajan

You can use Generic Load pfa sample.

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Depending on what you want to wind up with, one approach may be:

Raw:

LOAD @1,

    @2,

    @3,

    @4

FROM

[My restaurant.txt]

(txt, codepage is 1252, no labels, delimiter is '\t', msq, header is 0 lines, filters(

Replace(1, top, StrCnd(null))

));

Menu:

LOAD

  if(@2='',peek('Course', RowNo()-2), @2) as Course,

  if(@3='',peek('Dish', RowNo()-2), @3) as Dish,

  @4 as Ingredient

RESIDENT Raw

WHERE @1 = 'Menu'

;

And then do the same for Foods and Ingredients as I did for menu.

-Rob