Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to separate semicolon delimited values to separate columns

Similar presentations


Presentation on theme: "How to separate semicolon delimited values to separate columns"— Presentation transcript:

1 How to separate semicolon delimited values to separate columns
Yoel Kortick Senior Librarian

2 Introduction The regular expression Example with course instructor
Example with ISBN

3 Introduction In Alma Analytics when there is a “one to many” relationship in one entity then the “many” values will often appear all together in one field delimited with a semicolon. For example: One “course name” may have multiple “course instructor” values One “bibliographic title” may have multiple “ISBNs”

4 One “course name” may have multiple “course instructor” values
Introduction One “course name” may have multiple “course instructor” values Two instructors separated by a semicolon Four instructors separated by a semicolon

5 One “bibliographic title” may have multiple “ISBNs”
Introduction One “bibliographic title” may have multiple “ISBNs” Two ISBNs separated by a semicolon Four ISBNs separated by a semicolon

6 Introduction It is possible, if desired, to have these “semicolon separated” values appear as separate columns. This can be useful for display and filtering purposes. While there are multiple ways in which this can be done, we will show here the use of the “regular expression”. This is perhaps the easiest method to use. As we will see it involves merely pasting the regular expression and then changing the column name and numerical value

7 Introduction Instead of this We will get this

8 Introduction Instead of this We will get this

9 Introduction The regular expression Example with course instructor
Example with ISBN

10 The regular expression – Syntax
The syntax of the regular expression is as follows. The user needs merely to the change the red and green parts below. The “n” is the column number (occurrence of the value between the semicolons) The “Column”.”Name” is how the column appears by default when doing “edit formula” Evaluate('regexp_substr(%1,''[^\;]+'', 1,n)',REPLACE("Column".“Name",';','\;')) Occurrence of value Name of column as it appears in “edit formula”

11 The regular expression – Course Instructor
In order to make the first column for the course instructor the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,1)',REPLACE("Course"."Course Instructor",';','\;')) In order to make the second column for the course instructor the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,2)',REPLACE("Course"."Course Instructor",';','\;')) In order to make the third column for the course instructor the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,3)',REPLACE("Course"."Course Instructor",';','\;'))

12 The regular expression – ISBN
In order to make the first column for the ISBN the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,1)',REPLACE("Bibliographic Details"."ISBN",';','\;')) In order to make the second column for the ISBN the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,2)',REPLACE("Bibliographic Details"."ISBN",';','\;')) In order to make the third column for the ISBN the regular expression is Evaluate('regexp_substr(%1,''[^\;]+'', 1,3)',REPLACE("Bibliographic Details"."ISBN",';','\;'))

13 Introduction The regular expression Example with course instructor
Example with ISBN

14 Example with course instructor
In the criteria tab add the field for however many times you want a separate column We will have four columns of course instructor

15 Example with course instructor
For each column do “edit formula” then add the appropriate regular expression

16 Example with course instructor
Instead of this (the default) First column Put this

17 Example with course instructor
Second column Third column Fourth column

18 Example with course instructor
Results show instructors in separate columns

19 Introduction The regular expression Example with course instructor
Example with ISBN

20 Example with ISBN In the criteria tab add the field for however many times you want a separate column We will have four columns of ISBN

21 Example with ISBN For each column do “edit formula” then add the appropriate regular expression

22 Instead of this (the default)
Example with ISBN Instead of this (the default) First column Put this

23 Example with ISBN Second column Third column Fourth column

24 Example with ISBN Results show ISBNs in separate columns

25 Yoel Kortick Senior Librarian
Thank You Yoel Kortick Senior Librarian


Download ppt "How to separate semicolon delimited values to separate columns"

Similar presentations


Ads by Google