Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4607

Add a split function that allows to separate string by a delimiter

    XMLWordPrintableJSON

    Details

      Description

      Ex: Let's say I have records in a CSV file with the following schema

      user_name, friend_list_separated_by_a_delimiter,other_fields
      ali,sam;adi;tom,45,...
      

      I want to run a query which returns the friend list files as a repeated value.

      select user_name, split(friend_list, ';') friends from userdata;
      

      This should return the records in the following format

      ---------------------------------
      | user_name |       friends     |
      ---------------------------------
      |   ali     |  [sam, adi, tom]  |
      ---------------------------------
      

        Attachments

          Activity

            People

            • Assignee:
              aalvarez Alicia Alvarez
              Reporter:
              aalvarez Alicia Alvarez
              Reviewer:
              Sudheesh Katkam
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: