Hi,
I currently have a workflow that uses the directory tool to pull the most recent Excel file added to a specified folder. Each file has the same formatting, specifically the same column headers. However, when each file is read the data types of the columns are not consistent.
I need help converting an entire column to be a double or integer, regardless of its initial data type. This is crucial as the file is joined with a static Excel sheet by this column, therefore they must be of the same data type.
The select tool does not seem to be working since a new file is read each time the build is run.
Below is an outline of my current workflow.
Hey @edesernia, you could try forcing this field to be a string and then doing the same for the static Excel table that you're joining to:
This would only be temporary whilst Alteryx conducts the Join. As the Join tool has built in Select tool functionality, you could therefore change the data types of the fields back immediately after:
Hi @edesernia,
1) Have you tried the auto field tool right after the directory input tool? This may help identify the data types as the columns are read into Designer.
2) You can also utilize a Multi-Field Formula tool to specify which tools you want to convert to proper data types as long as column names are static.
For numbers, use ToNumber([_CurrentField_])
3) There is another community link that you can view as a reference for other solutions.
If this helps in any way, please like the post and mark it as a solution. Reach out with any other questions if you have any.
Hi @edesernia
You can try to save the configuration of your select tool. I never did it, but it seems like a worth try
https://www.thedataschool.co.uk/jeremy-kneebone/alteryx-save-tool-configuration