hi,
i am trying to use the Directory tool to compare previously captured data so i can disregard them in a MoM working file. When i use the Dynamic Input Tool for the Input Data Source Template, i get an error that says "file has a different schema than the first file in the set."
The directory is reading about 10 files but the error only appears for two files. When i compare the files, the columns are all the same so i can't figure out what is causing this error.
Does anyone have any ideas?
Thanks,
Diana
Solved! Go to Solution.
Hello @dattina2287
See this link: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-Input-Different-Schema/td-p/65...
You will have to create a batch macro to import these files.
Hey @dattina2287,
use the field info tool on a file which works and a file which does not work that will tell you which data types, columns, ect are different and what is causing the error.
If there are lots of columns join the results with the join tool on Name and Type to find the difference.
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
thanks @IraWatt . This worked! i was able to find the column where the data type is different.
@IraWatt it looks like if the column is blank, the data type is double but if it's populated then it's v_string. Is there a way i can create a formula to change any instances of that column being blank that would update the data type to v_string? i think this would help so that the schema is the same for all files.
Thank you!!
@dattina2287 there are a few options to solve this problem, sadly there isnt a simple formula or setting to stop this from happening.
Option one: Use a macro like suggested by @dougperez
Option two: Use my prebuilt macro on the gallery Dynamic Input Allow Different Fields Tool - Alteryx Community, just pass your file locations+sheet names to the tool.
Option three: Use CSV's/YXDB files as all data will always be inputted as string/ the correct type.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |