Alteryx Designer Desktop Discussions

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

Remove 1st Row and Last Row of each CSV input

caltang
17 - Castor
17 - Castor

Hi all!

 

I'm currently inputting multiple CSV files as one entry using the * line. But I'm encountering the error:

 

Too many fields in record #1.

 

How do I remove the first row (header) and last row (trailer)?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
4 REPLIES 4
gabrielvilella
14 - Magnetar

Are you using the correct delimiter? There isn't a way to remove rows before reading the entire file. If your delimiter is not working just for the first line, for instance, you can use the \0 as delimiter, remove the problematic rows using the Sample, then parse the data using the Text to columns tool.

Qiu
21 - Polaris
21 - Polaris

@caltang 
I agree with @gabrielvilella 

Too many fields in record #1. means the delimiter is somehow wrong.

Can you upload a sample input file?

allwynthomas24
11 - Bolide

Hey @caltang,

 

As per my understanding, try to use directory tool to provide the folder link and get all the files available in that folder and then create a batch macro to perform the required process and try to save in a separate folder.

 

Please correct me if I am wrong.

 

Thanks & Regards,

Allwyn.

caltang
17 - Castor
17 - Castor

Hey guys, thanks for the input! I've solved it via the input tool. Just use row 2 onwards and filter any columns past Field 2 which is not null.

 

This solves it. Thanks!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels