Re: regexp_extract regex for extracting the columns from string

2020-08-10 Thread Enrico Minack
You can remove the <1000> first and then turn the string into a map (interpret the string as key-values). From that map you can access each key and turn it into a separate column: Seq(("<1000> date=2020-08-01 time=20:50:04 name=processing id=123 session=new packt=20 orgin=null address=null

Re: regexp_extract regex for extracting the columns from string

2020-08-10 Thread Patrick McCarthy
Can you simply do a string split on space, and then another on '='? On Sun, Aug 9, 2020 at 12:00 PM anbutech wrote: > Hi All, > > I have a following info.in the data column. > > <1000> date=2020-08-01 time=20:50:04 name=processing id=123 session=new > packt=20 orgin=null address=null

regexp_extract regex for extracting the columns from string

2020-08-09 Thread anbutech
Hi All, I have a following info.in the data column. <1000> date=2020-08-01 time=20:50:04 name=processing id=123 session=new packt=20 orgin=null address=null dest=fgjglgl here I want to create a separate column for the above key value pairs after the integer <1000> separated by spaces. Is there