Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying to integrate data from a csv file to Salesforce. The columns are street number, street name and unit number, and let's say I would like to keep them in that order. Not all address will have a unit number. Currently I have 2 tmaps
Tmap1: row1.B1_Borrower_Unit_Number==null?"": " "+row1.B1_Borrower_Unit_Number
It does the same for street name (add space before the street name)
Tmap2: concatenates using street number + street name + unit number
The issue is the " " before the string is getting removed
Current output:
23Sheppard Avenue55
Desired output:
23 Sheppard Avenue 55
Please help? Thanks
Hi,
I got the address correctly as shown below.
The function in simple form is as shown below.
Relational.ISNULL(row1.borrower_unit_number)? row1.street_number+" "+ row1.street_name : row1.street_number+" "+ row1.street_name+" " + row1.borrower_unit_number
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi Nikhil
Thank you for your help. I actually simplied it a bit. In actually, there is:
Street number
Street Name
Street Type
Street Direction
Unit Number
To add space in the second tmap using conditional statements, there would be a lot of permutations and very complex. I was hoping to be able to add a space to the front of street name, type, direction and number in the first tmap so it would only have the space when unit number, direction are not null.
Hi,
Ideally I would never recommend to do address validation manually. Talend has got Address standardization components where you can call the corresponding APIs to make the address value in right format. Please see the screen shot below.
My recommendation will be to utilize these components along with subscription to corresponding services to standardize the data especially we are in the era of Privacy laws like GDPR, California Privacy law etc.
If you will have to do it manually, you will have to handle all the permutations and combinations also in manual fashion.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi
Have you tried to put it like this:
row1.B1_Borrower_Unit_Number == null ? "" : (" " + row1.B1_Borrower_Unit_Number)
Regards