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

Basic Question: String fields will not join

scottjanse1
7 - Meteor

Hi all,

 

I keep on getting an error that the string fields can only be joined to other string fields. However, I changed the type to v-string but it still will not join. Can someone help me with this.

 

Thanks in advance,


Scott

11 REPLIES 11
pvijendr
7 - Meteor

Can you try the attached WF.. I just used formula tool to create a new field with other data type and joined. It seems to be working. You can change the field name as you want..

danielbrun2
ACE Emeritus
ACE Emeritus

Hi Scott,

 

Thanks for posting. Just for info you can use "Options->Export Workflow" to make a package with datafiles.

 

Back to the question. Your issue can be found here:

Skærmbillede 2016-05-12 kl. 11.21.04.png

 

Skærmbillede 2016-05-12 kl. 11.20.58.png

 

In the first file the field is a v_string and in the other it is a Double. They need to be the same type.

 

Best,

Daniel

 

danielbrun2
ACE Emeritus
ACE Emeritus

And a working packaged workflow.

 

Daniel

scottjanse1
7 - Meteor

Thanks I will try this :)

scottjanse1
7 - Meteor

Hi Daniel,

 

Thanks for the reply. And thanks for the tip on the packaged workflow, i was wondering that ;). I tried to change the type as well but it still gives me the error. I am also unable to open your alteryx workflow as it the document was created by a more recent version and cannot be read. I am really keen to see what made the difference in your alteryx. I am going to try to download the new version and will keep u posted. Thanks!

scottjanse1
7 - Meteor

Thanks! I just the select tool and it works! :) I will try this with the rest of the file where the same error occurs. Thanks!

RodL
Alteryx Alumni (Retired)

Glad this is solved, but just to add some comment on it...

It is understandable that you initially thought to change the data type in the Join tool. However, what users need to keep in mind is that using the "Select functionality" within the Join tool (or other tools that contain this functionality) affects the data coming OUT of the tool and not going INTO the tool. 

So @danielbrun2's solution to put a Select tool in front of the Join is the proper process. This way the data type is changed coming OUT of the actual Select tool and is typed properly going INTO the Join tool so it can join on like data types.

A good "best practice" if you are dealing with multiple data sources that you intend to Join down the workflow is to add Select tools immediately after the Input tools and ensure that you have consistent data-typing (and even renaming, since it can make it easier to figure out what you are doing later in the workflow) as it is needed.

jcook127
5 - Atom

Really helpful, Rod; thanks!

 

Users must remember to change data BEFORE it goes into the Join tool. Changing data types in the Select tool worked like a charm.

RifferX
8 - Asteroid

I wanted to add to this thread as a simple noob. I just struggled for hours trying to join two v string fields and even went so far as to create excel outputs and then pull them back in to join with no luck -- after first trying the select tool again before both my joins. I even checked the excels closely for white spaces gaps etc. and nothing appeared incorrect. Finally, I looked closely at the actual data in my first join field and there appeared to be a tiny bit of white space prior to the first letter compared to the other fields.  

 

Sure enough, I went into the Formula tool where I had previously combined two fields and tried the trim feature that removes white space before and after the string and bam, that was it. Joins then worked flawlessly. Hopefully, someone else who runs into this issue will find this thread sometime because it drove me nuts and was such a simple and obvious thing to look for.......I don't know why those white spaces were there but they were. Must have been from the DB itself where I queried from...

Labels