Fri Nov 16, 2018 8:56 pm
Login Register Lost Password? Contact Us


Searching for an Archived WUID via ECL/c++?

Comments and questions related to the Enterprise Control Language

Tue Jul 03, 2018 12:52 pm Change Time Zone

Morning,

I was wondering if there is a way to search through archived work units and look for specific code that was executed. I know this can be done manually in ecl watch if you know the date that the query was executed on. I'm interested in programmatically adding my own filters for finding the work units and search criteria that will find archived ecl. Even something that I can return all the archived ecl in the xml format and then I can do a search after I have saved those search results to a dataset(s).

In essence I'm looking for bwr code that is not saved to my machine.

Thanks Tim
newportm
 
Posts: 8
Joined: Tue Nov 15, 2016 2:48 pm

Tue Jul 03, 2018 7:16 pm Change Time Zone

Archived workunits are stored on disk in the folder specified in your configuration. Each WU is a folder containing one or more files. One of these files is an ECL Archive named <wuid>.XML

The default is:
/var/lib/HPCCSystems/hpcc-data/sasha/Archive/WorkUnits

You could use find or grep or a combination of the two. The following example returns all WUIDs containing the word JOIN:

Code: Select all
egrep -lir /var/lib/HPCCSystems/hpcc-data/sasha/Archive/WorkUnits --include=*.{xml,ecl,cpp} "JOIN"


If you want to run a linux command using ECL, you can try:
Code: Select all
STD.System.Util.CmdProcess


HTH,
Jim
JimD
 
Posts: 136
Joined: Wed May 18, 2011 1:35 pm

Wed Jul 04, 2018 2:02 am Change Time Zone

Thank you!
hellowangzhi
 
Posts: 6
Joined: Wed Jul 04, 2018 1:29 am


Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest

cron