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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
ankushd
Contributor
Contributor

Dynamically drop fields from input to output

Hello All,

 

Please see below use case and let me know how we can implement?

INPUT

COL1 | COL2| COL3| COL4

I Want to drop anyone of the column at run time(accepting either through Context Or prompt) and pass other columns.

Lets say i decide to drop COL4 , then output should be

COL1|COL2|COL3

Labels (2)
2 Replies
David_Beaty
Specialist
Specialist

Hi,

You'll probably need to read the rows in with the full row component and manually split it apart and reconstruct it back into a single column and write out. It won't be pretty, but it will work.

 

akumar2301
Specialist II
Specialist II

Yes there is no component to do so . Other way is to use Regex Pattern to remove a column value.

 

Step 1) Find index of  column needs to be removed 

 

Step2) using below java pattern , remove column index found in step1 ( assuming input is comma separated) 

 

"^((\\w,){nth})(?:\\w,)(.*)$"

 

Attaching a sample job for you which could help.


dsfhfdgk_0.1.zip
in.csv