Read and store data from event History - event XML column | Community
Skip to main content
Jaspreet_Kaur1
Level 2
October 27, 2017
Solved

Read and store data from event History - event XML column

  • October 27, 2017
  • 4 replies
  • 3387 views

Hello all,

I need to extract the data from eventXML (ctx type) from the eventHistory schema, but as this column is in the xml format, I am unable to read in the queryDef or query activity.

I need to read some of the fields from this column dynamically and further export them. Unsure the way to extract.

Any help pls?

Have gone to one of the similar issue threads in this forum, but was not clear to me.

Any help will be appreciated.

Thanks,

Jas

@Jean-Serge Biron

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jean-Serge_Biro

Hi Jaspreet,

When extracting/exporting the file, what kind of file type do you choose ? Xml one ? I don't understand why you get the content.

Regarding how to get specific element/content inside the XML element, sorry I don't know easy way. Eitherr SQL string manipulation (not recommended) or Javascript code manipulating XML element (DOM nodes) (either in the Extract activity/format section or in dedicated JS activity), and of course accurate object elements for specific cases,described in the JSAPI documentation (such as delivery.mailParameters.subject etc).

Regards
JS

4 replies

Jean-Serge_Biro
Level 10
October 27, 2017

Hi Jaspreet,

As in other threads with same subject, please use the Extract activity in a workflow, or the Export template tool (quite the same) to get the xml type fields (mData/memo fields) exported to a file.

BR
JS

Jaspreet_Kaur1
Level 2
October 27, 2017

Thanks Jean,

Tried extracting from the extract activity, but not getting any result.Pasted is the screenshot below, where I want to extract the event XML column data which is in the ctx format. And what if I want to extract some specific field inside that XML. is there any syntax you can share?

Jean-Serge_Biro
Jean-Serge_BiroAccepted solution
Level 10
October 30, 2017

Hi Jaspreet,

When extracting/exporting the file, what kind of file type do you choose ? Xml one ? I don't understand why you get the content.

Regarding how to get specific element/content inside the XML element, sorry I don't know easy way. Eitherr SQL string manipulation (not recommended) or Javascript code manipulating XML element (DOM nodes) (either in the Extract activity/format section or in dedicated JS activity), and of course accurate object elements for specific cases,described in the JSAPI documentation (such as delivery.mailParameters.subject etc).

Regards
JS

Level 3
January 29, 2019

Hi Jaspreet,

I have the same issue. I am not able to extract to XLM element to CSV format. It would be the best if I can to extract some specific field inside that XML. Have you figured out a way to archive this?

Thanks,

Jason