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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parsing a variable length text field

Hello community, please help!

 

I have a table with the following values:

profile_id | vul_id

'1'            |'33 - .10\n34 - .10\n56 - .10\n57 - .20\n58 - .25\n'
'2'            |'5 - .5\n6 - .5'
'3'            |'8 - .5'
'4'            |'4 - .1\n24 - .25\n25 - .25\n26 - .15\n27 - .25'

 

I need to parse it in a following manner: (multiplying each record according to the number of values in the Vul_id column:

profile_id | vul_id | weight

'1'            |'33'      | .1
'1'            |'34'      | .1
'1'            | '56'     | .1
'1'            | '57'     | .2
'1'            |'58'      |  .25
'2'            |'5'        |  .5
'2'            |'6'        |  .5
'3'            |'8'        |  .5
'4'            |'4'        |   .1
'4'            | '24'     |   .25
'4'            | '25'     |   .25
'4'            |'26'      |   .15
'4'            |'27'      |   .25

 

Please suggest how to approach this task

 

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hello,

Could you please let us know if this community knowledge article helps?

https://community.talend.com/t5/Migration-Configuration-and/Converting-columns-to-rows/ta-p/21658

Best regards

Sabrina