Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Help in Transpose

tahertalib
7 - Meteor

Hi All,

I am working with google API and have got the below output(Google API output from Alteryx). I want to transpose that data into the below format. Could someone please help me with the same?

the JSON name output from google is dynamic. If there is a suite number attached to it, then the value shifts. Any help will be appreciated.

 

As an alternative, can i use the data from column "result.adr_address" with REGEX to split the address into separate fields?

 

Expected Output from below google API:

 

street numberroutelocalityadministrative_area_level_2administrative_area_level_1countrypostal_coderesult.geometry.location.latresult.geometry.location.lng
311Burnt Ridge RdBlackfaldsRed Deer CountyABCAT0M 0J052.2935953-113.8694788

 

Google API output from Alteryx

 

JSON_NameJSON_ValueString
result.address_components.0.long_name12345
result.address_components.0.short_name12345
result.address_components.0.types.0street_number
result.address_components.1.long_nameBurnt Ridge Road
result.address_components.1.short_nameBurnt Ridge Rd
result.address_components.1.types.0route
result.address_components.2.long_nameBlackfalds
result.address_components.2.short_nameBlackfalds
result.address_components.2.types.0locality
result.address_components.2.types.1political
result.address_components.3.long_nameRed Deer County
result.address_components.3.short_nameRed Deer County
result.address_components.3.types.0administrative_area_level_2
result.address_components.3.types.1political
result.address_components.4.long_nameAlberta
result.address_components.4.short_nameAB
result.address_components.4.types.0administrative_area_level_1
result.address_components.4.types.1political
result.address_components.5.long_nameCanada
result.address_components.5.short_nameCA
result.address_components.5.types.0country
result.address_components.5.types.1political
result.address_components.6.long_nameT1M 0J0
result.address_components.6.short_nameT1M 0J0
result.address_components.6.types.0postal_code
result.adr_address<span class="street-address">12345 Burnt Ridge Rd</span>, <span class="locality">Blackfalds</span>, <span class="region">AB</span> <span class="postal-code">T1M 0J0</span>, <span class="country-name">Canada</span>
result.formatted_address12345 Burnt Ridge Rd, Blackfalds, AB T1M 0J0, Canada
result.geometry.location.lat11111
result.geometry.location.lng22222

 

3 REPLIES 3
Chantelb
9 - Comet

Hi @tahertalib ,

 

You can make it dynamic by using types.0 to name the columns. If there is a suite number it will have a new column which you can deselect if you wish. See workflow attached.

 

Chantelb_0-1634701175162.png

 

Let me know if this helps.

tahertalib
7 - Meteor

Thanks @Chantelb 

The solution works perfect. Had another query. If i try to replicate this for multiple addresses, it doesnt work as expected. Would you know how to deal with this if there are 100's of addresses? 

 

Thanks

Chantelb
9 - Comet

Hi @tahertalib ,

Yes you need a number for each address and then you can use this to group by on the cross-tab tools. If there is no number from the API you can create one using a multi-row formula. See updated workflow attached.

Cheers

Labels