ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
The Alteryx Community will be temporarily unavailable for a time due to scheduled maintenance on Thursday, April 22nd. Please plan accordingly.

Alteryx Designer Discussions

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

Dynamic Input - Different Schema

mullinsjo
7 - Meteor

I am currently working on a workflow that brings in a bunch of excel files with various metrics. The way the current files are set up is using columns at the top with the month-year format. Some of the files have 2021 and some do not therefore when I run the workflow I get the error "has a different schema than the first file in the set." Is there a workaround for this?

morr-co
10 - Fireball

Hi @mullinsjo : I have not found a workaround for this with the dynamic input tool. However, you can create your own batch macro that accepts the file path (and sheet name, if Excel). The action tool can then update the file path value. In the Interface Designer, configure the macro to "Auto Configure by Name" so that it does not error when the file headers differ. An example of what the macro would look like is below.

 

Screen Shot 2020-10-22 at 3.04.43 PM.png

morr-co
10 - Fireball

Probably more useful to include the actual macro 🙃  You can pass a list of files into the macro - the full path - and it will read and output them. I have it configured to also give you the file name. With Excel, you must also add the sheet name to the full path. For example: {FilePathandName.xlsx}|||{SheetName}. There is a quirky thing with batch macros where it sometimes does not return the full results. If you notice this behavior add a Select tool afterwards and you should see everything. 

mullinsjo
7 - Meteor

@morr-co Thank you for your help!

Labels