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 with spaces

Kavya432
8 - Asteroid

Hi Team,

 

The problem is when I am joining with iDrive file(which I am inputting to Teradata table) which has just one space ': and AWD'(eg: Best in Class:  AWD10) with MC_Desc file which has two Spaces between  ': and AWD'. That's the reason its not joining, is there any way to make it consistent for these names across both files in Altreyx?

 

Hear are few examples with Spaces

Best in Class: AWD10
Specialty Care Abuse Awareness: Child Abuse
Specialty Care Abuse Awareness: Elder and Vulnerable Adult Abuse
CL Direct: Trailing Documents and Contingencies
MSB 010 - MS/B 4.1 Overview

Hear are files and workflow

 

Master Course file has two spaces and iDrive file has one space.

 

Thanks

Kavya

3 REPLIES 3
jrgo
14 - Magnetar

Hi @Kavya432 

 

Not sure if i'm fully following, but this expression below may help to clean multiple, consecutive, spaces found in a string.

UPPERCASE(TRIM(REGEX_REPLACE([Field1], '\s{2,}', ' ')))

Apply this to both sides before the JOIN. It'll find any instances of 2+ spaces and reduce to a single space then trim out any whitespace found at the start or end then uppercase all.

 

Hope this helps!

Jimmy
Teknion Data Solutions 

Kavya432
8 - Asteroid

Thank you foe suggestion, But using that doesn't work,doesn't improve the number of rows. 

jrgo
14 - Magnetar

@Kavya432 

 

Sorry, I should have clarified. The expression is using REGEX, but it's to be used in a normal Formula tool, not the REGEX tool. Delete those two REGEX tools you added and update the two Formula tools as illustrated below. 

image.png

 

In the top one, use

UPPERCASE(TRIM(REGEX_REPLACE([Course], '\s{2,}', ' ')))

 

On the bottom, use

UPPERCASE(TRIM(REGEX_REPLACE([Training_Title], '\s{2,}', ' ')))
Labels