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

order of priority

[size=3][font=Times New Roman","serif]Hello,[/font][/size]

[size=3][font=Times New Roman","serif]I am working with one JSON file.[/font][/size]

[size=3][font=Times New Roman","serif]After using tnormalize data is showing for ex.[/font][/size]

[size=3][font=Times New Roman","serif]Name  Type         Add[/font][/size]

[size=3][font=Times New Roman","serif]A        PH            1[/font][/size]

[size=3][font=Times New Roman","serif]A        BA            2[/font][/size]

[size=3][font=Times New Roman","serif]B        CR            3[/font][/size]

[size=3][font=Times New Roman","serif]B        ML            4[/font][/size]

[size=3][font=Times New Roman","serif]C        BL             5[/font][/size]

[size=3][font=Times New Roman","serif]C        ML            6  [/font][/size]

[size=3][font=Times New Roman","serif]Order of priority for column Type would be[/font][/size]

[size=3][font=Times New Roman","serif]1. PH[/font][/size]

[size=3][font=Times New Roman","serif]2. BL[/font][/size]

[size=3][font=Times New Roman","serif]3. ML[/font][/size]

[size=3][font=Times New Roman","serif]4. CR[/font][/size]

[size=3][font=Times New Roman","serif]want output like[/font][/size]

[size=3][font=Times New Roman","serif] [/font][/size][size=3][font=Times New Roman","serif]Name  Type        Add[/font][/size]

[size=3][font=Times New Roman","serif]A        PH            1[/font][/size]

[size=3][font=Times New Roman","serif]B        ML            4[/font][/size]

[size=3][font=Times New Roman","serif]C        BL            5[/font][/size]

[size=3][font=Times New Roman","serif] [/font][/size]
[size=3][font=Times New Roman","serif]Please suggest.[/font][/size]

Labels (2)
4 Replies
Anonymous
Not applicable
Author

Please suggest on the above mentioned query.
I need to select data as priority of column "Type" and discard other records for the "Name" column
Franz3
Contributor III
Contributor III

you have several options, do you have already know the diferent types? how do you chose the value you re going to keep if there are several (B        ML            4 and C        ML            6  ) in your exemple. How can you define the priority (manually or in db?)
Anonymous
Not applicable
Author

yes I know different types and order of the priority is fixed: for ex.
[size=3][font=Times New Roman","serif]1. PH[/font][/size]
[size=3][font=Times New Roman","serif]2. BL[/font][/size]
[size=3][font=Times New Roman","serif]3. ML[/font][/size]
[size=3][font=Times New Roman","serif]4. CR[/font][/size]
[size=3][font=Times New Roman","serif]5. BA[/font][/size]
[size=3][font=Times New Roman","serif]I need to define the priority manually in the job. [/font][/size]
Franz3
Contributor III
Contributor III

MMh, i think you will have to split your flow:
1) tnormalize
2) Tmap (you change the schema as you like it deleting columns and you split depending on the value of the type PH,BL
 as you know it)
3)you put all of your Tmap outputs in several temp files or in hashOutput if you care for perf.
4) On subjob ok -> all hashInput or TfileInput connected to Tunite in the order you want.
you have your flow