Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to format

Hi Everyone

I have data in text file in following format in straight line one after another.

Administrators

     user1

     user2

     user4

     user5

Remote Desktop Users

     user5

     user8

     user3

how can i change via QlikView ETL so it becomes in following format.

Administrator               Remote Desktop Users

user1                            user5

user2                            user8

user4                            user3

user5

2 Replies
MarcoWedel

Hi,

one possible solution:

QlikCommunity_Thread_133827_Pic1.JPG.jpg

tabTextFile:

LOAD *,

    If(Match(Line, 'Administrators', 'Remote Desktop Users'), Line, Peek(Type)) as Type

Inline [

Line

Administrators

    user1

    user2

    user4

    user5

Remote Desktop Users

    user5

    user8

    user3

];

tabOutput:

Generic LOAD

  AutoNumber(RecNo(), Type) as ID,

  Type,

  Line

Resident tabTextFile

Where Type<>Line;

hope this helps

regards

Marco

nagaiank
Specialist III
Specialist III

The following script also works:

A:

LOAD RowNo() as ID, * Inline [

Admin

user1

user2

user3

user4

];

B:

LOAD RowNo() as ID, * Inline [

User

user5

user6

user7

];

left Join (A) LOAD * Resident B;

DROP Table B;