Alteryx Designer Desktop Discussions

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

Text To Column How to align data in the Correct column while fetching data from an API

Ashwin1
7 - Meteor

Hi All, 

         I am fetching data from an API. Then i use Text to Column to order the values in column. 

         The issue is the row of values does not match. For e.g. Row 1 might have 20 Columns, Row 2 might have 22 Columns, Row 3 might have 21 columns. So the values are not under the right column. Is there anyway to work with this. Find Attached sample Sheet 

 ColAColB ColC ColD
ROW1 ABCD
ROW2ABCD
ROW3AD 
ROW4ABCE
     

In the Above sheet you can see that in Row3 ColB has a value 'C' when it has to be 'B' or 'null' but since the API does not have a null or anything it is fetching the next record and putting in the wrong column.

 

Any Suggestions would help

 

Thanks 

Ashwin

 

4 REPLIES 4
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Ashwin1,

 

Can we see the output response of the API call? Are there any column headers returned?

 

Regards,

Jonathan

Ashwin1
7 - Meteor

Hi Jonathan,  

                     I am afraid i wont be able to share that but yes it does return headers and values in this format. 

ROW1 -"COLA":"A" , "COLB":"B", "COLC:C","COLD":"D"

ROW2- "COLA":"A", "COLC":"C", "COLD":"D"

ROW3- "COLA":"A", "COLB":"B", "COLC":"C","COLE":"E"

 

Regards

Ashwin

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi Ashwin,

 

Is this what you're looking for? You can remove the RecordID if needed with a select tool, i simply used it as a row number to group the fields together.

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workbook for you to download if needed.

 

Regards,

Jonathan

Ashwin1
7 - Meteor

Fab... Thanks Much Jonathan-Sherman..

Labels