Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Joining two fields of slightly different datatypes

cdfrost
5 - Atom

Hello,

 

I'm new to Alteryx Designer and I'm trying to reproduce an ETL process I've built in SQL. The process involves the joining of two fields -- a date field and a datetime field. In order to do this in SQL, I I cast the datetime field as a date and the join is straightforward. How can I accomplish this in Designer? When I bring in a join block, Alteryx requires the two data fields to be of the same type.

 

Thanks for any help you guys can provide!

4 REPLIES 4
Claje
14 - Magnetar

Hi,

I'm assuming that your data source in this case is a file or something along those lines?

If you put a Select tool into your flow before the Join tool, you should be able to modify the field type there, which will let the Join tool work without issue.

cdfrost
5 - Atom

Hi Claje, I'm aware of this technique, but I'm needing to keep the time element in the datetime field. Will doing this retain the time, or would I be able to pull it back in with additional Alteryx blocks?

Claje
14 - Magnetar

In that case, I would recommend creating a new field using the Formula tool.  You can select its type as a Date, and the formula can simply reference the initial field.


Then you can join using the new field you created, and deselect your Formula-created field within the Join tool to remove it from the downstream.

cdfrost
5 - Atom

Thank you - I will give that a shot!

Labels