Alteryx Designer Desktop Discussions

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

Changing Data Type

edesernia
6 - Meteoroid

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.

3 REPLIES 3
DataNath
17 - Castor

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:

 

DataNath_0-1669843023472.png

 

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:

 

DataNath_1-1669843068599.png

PanPP
Alteryx Alumni (Retired)

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_])

 

Data Types.png

 

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.

Felipe_Ribeir0
16 - Nebula

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

 

Labels