Amazon Report Gunzip Error, Convert Encoding and text to array issues

Due to the bug in Amazon report headers that doesn’t always allow you to retrieve all the data from Amazon reports with GUNZIP, I use the “convert the encoding of a text” function to retrieve the data from my file.

This data appears as a single line including the header fields and data lines, separated by tabs and line breaks.

For almost 4 hours now, I’ve been desperately trying to transform this single file into a usable array and send it to Big Query, with no success.

I’ve tried the csv module, the split function, the text replace functions, but in the end I always end up with a single line generated in my output data and not a nice nested array that would allow me to use the iterator to send my data to a big query table. Does anyone have a solution?

Thanks
Benjamin

@Benjamin_HAMON - I’ve been struggling with a time issue for the daily Inventory Ledger report, but I just got the FBA Manage Inventory Health report working.

It uses similar modules ‘Create a Report’ > ‘Download a Report Document’ > ‘Convert the encoding of a text’ to what you’ve done, but my next module is the ‘Parse CSV’ module.

I set the Delimiter to Tab:

And the output is in columns which I then can import into Airtable:

Here’s the entire scenario:

(EDIT: Original message had toString conversion in the Parse CSV module but this isn’t required as the encoding already converted report output to text)

2 Likes

@andyc welcome to the Make community, and for a great first answer!

As you have mentioned, this is definitely a TAB-delimited CSV, and thus can be processed by the CSV module.

What gives it away as “TAB”-delimited, are the different space widths on the same line:

3 Likes

IT works ! Thank you so much for your support @andyc !!!

3 Likes