Reply
New Contributor
Posts: 1
Registered: ‎10-07-2018

Changing Delimiter Pattern on Single Column/Sub-Column. Multiple Columns?

Got a text file with the following pattern:

 

Will|Montreal|Male,35|Perl:85|Test:Tester,QA
Shelley|New York|Female,27|Python:80|Test:Lead,Architect

 

This becomes a column represented by a map<dept:String, array<position:String> with the following delimiter pattern...

 

ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
COLLECTION ITEMS TERMINATED BY ','
MAP KEYS TERMINATED BY ':'

This comes out messy not getting my target arrangement of :

Department   Position  Position

Test                QA

Sales              Lead      Architect. 

 

Is it possible to rewrite the delimiter pattern schema for that column alone? Chaning the field's types alone require rewriting the table's whole schema to do it. Else I could see splitting the column and putting it into a table with a delimiter pattern doing the job and merging back in into the original table.

 

Announcements