Alteryx Designer

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

Hack for error "has a different schema than the 1st file in the set and will be skipped"

Highlighted
7 - Meteor

Problem: Field type of same columns of two different files are different hence the error.

 

Hack if you don't want to use Batch Macro:

 

1) Assuming your files have column names at the top, in the Input Data, tick "First Row Contains Data". This will bring column name as data and will force all the field types as V_String.

 

2) Then use Dynamic Rename tool to "Take Field Names from First Row of Data". Untick "Dynamic or Unknown Fields" (and "FileName" if you have "Output File Name as Field" in Step 1)

 

3) Then use Select tool to convert field types. So for instance, for column with values, you change the type to "Double". This will force all other column names for column with values on other files to appear as "Null".

 

4) Then use Filter tool to filter out the null values (effectively filtering out all the column names on other files.

 

(Sample attached)

Highlighted
Alteryx Partner

Oh! I sooo love this. Great work @haozhong! what else you got up your sleeve? Haha

 

 

Highlighted
7 - Meteor

@joshuaburkhow Once I get 100 likes in the original post, I will release more hacks. LOL

Highlighted
5 - Atom

Didn't understand what you were trying to say the first 5 times, but on my 6th visit to your post from Google.. it made perfect sense..

I wasted a full day trying to understand the other macros..

 

Thanks for the common man's solution. 

Highlighted
7 - Meteor

@MWP lol I am glad that it helps. Yes, please don't give up on me.

Highlighted
5 - Atom

Really good advice. Thanks.

 

Quick question: In my case, the issue remains as a specific column is being read as v_string in some files for some files and v_wstring. Macros is what is left for me?  

Highlighted
7 - Meteor

Any suggestions if bringing in multiple tabs from the same Excel file?

Highlighted
6 - Meteoroid

@haozhong,

 

I tried the logic as you said for processing multiple excel files. When loading into target the header from the second file is also loaded. Any idea how to avoid it. I have attached the workflow and the files I have used.

Highlighted
7 - Meteor

@burtonnirmal 

 

Hello,

 

Don't worry. Step 3 and 4 will get rid of them for you.

 

Cheers

 

 

Highlighted
6 - Meteoroid

Yes it worked. The data has spaces. After trimming the data, it worked. Appreciate your help.

Labels