Clay Icon

Extracting Comma-Separated Values into Rows in a New Table

Β·
Β·

I used an AI prompt to get a list of companies based on data in another table. The output is a text string separated by commas. I'd like each value between/before/after columns to create a row in a new table. What is the best way to do that? Screenshot of the output for context.

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To convert a text string of comma-separated values into individual rows in a new table in Clay, you can use the "write to table" feature. Here's how: 1. Use the "Extract Data From Values" function to process your CSV data. 2. Apply a custom extraction Regex: [^,"]+"?[^,"]+ to split the values into a list. 3. Select "write to table" and choose a destination table (or create a new one). 4. Select the column containing your processed list. 5. Map the list data to columns in your new table. This method will create individual rows for each item in your comma-separated list.

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·
  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    Thank you so much for sharing your feedback ​Meg C.​!