Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Help with parsing string field to extract specific parts of the string.

csh8428
11 - Bolide

I need to extract some values from the headers returned via API call

The text is like so

HTTP/1.1 204 
Date: Mon, 30 Jun 2025 19:31:03 GMT
Connection: keep-alive
Set-Cookie: JSESSIONID=VERYLONGSESSIONIDSTRING; Path=/; Secure; HttpOnly; SameSite=lax
Set-Cookie: clientId=VERYLONGCLIENTIDSTRING; Path=/;

 

I'm trying to figure out how to extract "VERYLONGSESSIONIDSTRING" as "Session ID" and "VERYLONGCLIENTIDSTRING" as "ClientID" so I can then feed those values into the  URL for the GET API call.

 

Thanks for an help!

3 REPLIES 3
binuacs
21 - Polaris

@csh8428 one way of doing this

image.png

AlteryxTrev
9 - Comet

@csh8428 While the above does work fantastically, I personally like to parse and formula my way to the solution. Here is the approach that I used:

 

1. Parse the data into rows using Text To Column

2. Filter to specific rows in question (The common string in both is "Set-Cookie: ")

3. Categorize each by using the Contains() formula based on finding SESSIONID and clientid

4. Parse the Value fields out looking for common identifiers (they both start with the equal sign and end with "; Path=/;")

5. Transpose the data such that you have the column names that you want.

 

If it is helpful, I've created this video as an assist where I take some time to walk through the various steps: https://youtu.be/kzNXS0qu_Dc

 

AlteryxTrev_0-1751330279983.png

 

Yogesh1795
8 - Asteroid

I like both methods, but the method by @AlteryxTrev is better.

Labels
Top Solution Authors