How do I spilt airbnb amenities data into multiple rows in Tableau Prep?

123 Views Asked by At

I need to split the following type of data into separate rows in tableau Prep Builder. There are only 2 columns: listing ID and Amenities like so:


Listing ID | Amenities
------------------------------------------------
123        | ["Oven", "Blankets", "WiFi", "Dryer", etc... ]

I would like to split them up like so:

Listing ID | Amenity
_________________________
123        | Oven
123        | Blankets
123        | WiFi
123        | Dryer
etc....

Is this possible?

I can split the amenities data into columns ok but this is not what I need.

If this is not possible in Prep Builder then I am ok with importing the data into SQLServer and using a SQL query if thats possible.

1

There are 1 best solutions below

0
On

For those who come to this later on and are looking for the same. This is how I achieved what I needed:

  1. Remove leading and trailing brackets from the string using RIGHT and LEFT functions
  2. Remove all quotes using REPLACE
  3. Refer to this link then for the rest: Turning a Comma Separated string into individual rows