Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

creating files from an API output that returns base64 encoded content

rishabh_saxena
6 - Meteoroid

i am trying to download and place certain files through an API call (download tool), but the base files are base64 encoded. i am unable to directly place the files through the "to a file" option in download tool, and if i use "to a string" it returns the content(base64 encoded), content size, FileName and description. the files are in in a mixed format of .xlsx, .msg & .pdf.

 

can someone help me to figure out how to create these files, attaching the output i am getting after using a json parse 

4 REPLIES 4
Raj
16 - Nebula

@rishabh_saxena 
you will need a batch macro which will convert the data from each record to a desired table format and which will run for all the records individually.
hope this helps.

rishabh_saxena
6 - Meteoroid

Thanks Raj,

 

But the problem is that I am unable to decode the base64 file to write it in a reportable format. is there a decoder available that decode the content and write the files in their respective format

Raj
16 - Nebula

@rishabh_saxena 
You can use the blob convert tool to move from blob to base64 and vice versa. Additionally, the blob input and output tools may be of use when working with images. 
refer the example in Alteryx designer.

hope this helps.

apathetichell
19 - Altair

you should not be using crosstab with entire file contents... --- you should be creating dynamic locations based upon your filename in your json --- and writing out files using the blob tools. You can then create a grid of locations. Kind of hard to explain how to do this --- but my recommendation would be to 

1) create a jsonItem category --- maybe using multi-row formula.

2) split the filename and content fields.

3) join the filename/item to the content/item.

4) formula tool to create the fulllpath.

5) blob output on content.

6) Drop blob field.

7) crosstab/manipulate do what you need to capture metrics on your fies.

Labels