-1

I have a text column in Redshift and want to extract manager or manager employee id from:

"Manager"=>"Alex Dar"
, "Cost Center"=>"02-40-731"
, "Manager employee ID"=>"testing@test.com"
, "Manager First Name"=>"Sohn",

I'm expecting to get manager, manager employee id and Manager First Name

nbk
  • 45,398
  • 8
  • 30
  • 47
mazur.os
  • 11
  • 3

1 Answers1

0

So, here is solution. At first, change it to json and then parse the json. json_extract_path_text(concat('{',concat(replace(custom_fields,'=>',':'),'}')),'Manager employee ID')

mazur.os
  • 11
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 07 '22 at 08:09