Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Dynamic Input Tool  - Diff Schema Error Message

dattina2287
8 - Asteroid

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

5 REPLIES 5
dougperez
12 - Quasar

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.

IraWatt
17 - Castor
17 - Castor

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.

IraWatt_0-1662567486148.png

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 

 

dattina2287
8 - Asteroid

thanks @IraWatt . This worked! i was able to find the column where the data type is different. 

dattina2287
8 - Asteroid

@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!!

IraWatt
17 - Castor
17 - Castor

@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.

Labels