Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Import CSV that doesn't start on the first row?

buchanan_ben
5 - Atom

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

15 REPLIES 15
cbridges
11 - Bolide

It still says it's an unknown file type, even though the macro itself is (almost) working. I'll keep playing around with it...

@thizviz
cbridges
11 - Bolide

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 ReportRows to SkipColumns to Parse
Ship1016
Open1812
Fill1819

 

Where rows to skip and columns to parse would update based on my report selection?

@thizviz
cbridges
11 - Bolide

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.

@thizviz
cbridges
11 - Bolide

Un.freaking.believable.

 

Sometimes I'm a little slow...

 

@JohnJPS I re-read the comments in this article:

http://community.alteryx.com/t5/Alteryx-Community-News/Alteryx-Hangout-There-s-more-to-Alteryx-than-...

 

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!

@thizviz
CailinS
Alteryx
Alteryx

Good stuff! I myself was pretty stunned! But the kudos are not mine alone! The tip was shared on an SE meeting by @ScottG who picked it up from a workflow @RichardS built!

Cailin Swingle
Customer Experience
cbridges
11 - Bolide

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!

@thizviz
Labels