I'd use a script transform here. You could use a regEx or simple string.contains to see if you have data in the /api column.
Then use split() or regEx to pull the data out of sess= and duration= & write it into new columns.
You could create the new columns in the script transform but personally I like to use a derived column transform BEFORE the script task to create the new columns - e.g. sess & duration.
You then have the columns created for all rows & just need to use the script task to add data to the sess & duration columns if data exists in the /api column.
I hope this makes sense!