Hi there,
I have a large (2GB) CSV file, and unfortunately for some reason the first 3 rows contain some notes. The headers are in row 4, and the data is all below that. Is there anyway in Alteryx to import this data and skip the first 3 rows and use row 4 for headers?
Thanks so much
Ben
Solved! Go to Solution.
It still says it's an unknown file type, even though the macro itself is (almost) working. I'll keep playing around with it...
I'm inching closer to a solution. Turns out I can convert my files to yxdb with no additonal tools, so as long as I do that one step first, I can continue my processing from there (so the macro will read it). Next question... how many rows I skip and how many columns I parse will depend on what file I bring in. Is there a way, in a macro, to make a drop-down that feeds a lookup table for the macro? Like this:
Select Report | Rows to Skip | Columns to Parse |
Ship | 10 | 16 |
Open | 18 | 12 |
Fill | 18 | 19 |
Where rows to skip and columns to parse would update based on my report selection?
Got it! Thanks to the recent webinar on chained apps, I learned how to set up my macro so all I need to do is connect the incoming file and select the type of report I'm processing and voila! It's all automated from there. This is a welcome upgrade from my previous process, although I'd still like to see the simlicity of just telling Alteryx what row the headers are on.
Un.freaking.believable.
Sometimes I'm a little slow...
@JohnJPS I re-read the comments in this article:
Lo and behold, the answer was sitting right there! Excel has no problems parsing my weird .prn files when I use comma AND tab delimited. So in Alteryx if I designate NO delimiters in the input tool and change the text to columns tool to delimit at comma AND tab, as suggested in @CailinS comment, whammo! A multi-tool process turns into a 3 tool process... input, parse, strip quotes. Done. Wow. I can't believe it took me this long to have this basic revelation!
Uber kudos for that tip, @CailinS!
I am delighted to report that by importing my weird .prn files as built-in type .csv, specifying that the first row contains field names, and seeting "Start Data Import on Line" (which is a recent addition) to the line where my field names start, it WORKS! I'm back to 1-tool import for these weirdo files, and I appreciate it!
Now I'm going to build an app so "Start Data Import on Line" can be designated by the type of report I'm importing.
You've made me happy!