Extracting body text from JSON structure in tickets_events table

Summary

How to extract the body text alone from the ‘events’ field in the tickets_events table, which contains JSON-like structure with ‘body’ section.


Question

i have connected zendesk suppport with mysql and would like to see all comments for 1 ticket. the tickets_events table contains that information in a field called events, but it comes in a jSON like structure, with a “body” section containing the texts I’m looking for. How can i extract the body text alone from that field?



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["extract-body-text", "json-structure", "tickets-events-table", "zendesk-support", "mysql"]

Create a view or use tools like dbt to perform a post-sync transformation to extract that information.