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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic column generation

  1. Implement the job to achieve below logic. If age_group is added newly in input file then that should be automatically handled in the output with respective Boolean values – Put 1 if the person belongs to that age group and put 0 if he doesn’t belong to that age group (Dynamic column generation)

Input:

Name  age_group(in yrs)

Aa  10-20

Bb  50-60

Cc  20-30

Output:

Name 10-20 20-30 30-40 50-60 60-70 70-80 80-90

Aa 1 0 0 0 0 0 0

Bb 0 0 0 1 0 0 0

Cc 0 1 0 0 0 0 0

 

 

Please help me out

Labels (1)
  • v7.x

2 Replies
Anonymous
Not applicable
Author

Hi,

 

   Since your output groups are pretty static (7 groups), you can add if else condition to check whether the incoming data is matching to the expected value for that group. If its matching, you can assign 1 else 0.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

akumar2301
Specialist II
Specialist II

Also if it is age group , you know the oldest person in world 😁. And then you know maximum possible column .