Session Relevance YAML escaping ": " character

(imported topic written by jpboisen91)

I have several Global Properties that have an embedded ": " (colon+space) within their names. When I create a Session Relevance statement and run it within the Session Relevance debugger they execute fine. The problem I am having is when trying to use the BFExtractToCSV.exe which uses the queriesConfig.yaml file to store Relevance. In YAML the ": " character sequence is treated as a special character. I am not seeing any way to escape this. YAML documentation states to surround it with single or double quotes, and it already is. Below is the relevance statement that works in the debugger.

Example:

(value of results (bes property whose (name of it = “IP Address Registration Address”) , it) | “”) of bes computers whose (exists values whose (it as lowercase = “mca”) of results (bes property “WMU: OU Site” , it))

(imported comment written by BenKus)

Try adding to the front:

(concatenation “%22: %22” of substrings separated by ": " of it) of …

Ben

(imported comment written by jpboisen91)

That did not work. Below is the contents of the queries.Config.yaml file and the output from BFExtractToCSV.exe.

  • Begin Contents of queries.Config.yaml file ----
  1. Config File uses YAML syntax
  2. Queries in this file can be used called by extractData.exe

MayoAlert_MCA:

relevance: (concatenation “%22: %22” of substrings separated by ": " of it) of (value of results (bes property whose (name of it = “IP Address Registration Address”) , it) | “”) of bes computers whose (exists values whose (it as lowercase = “mca”) of results (bes property “WMU: OU Site” , it))

  • End Contents of queries.Config.yaml file ----

  • Begin output from running BFExtractToCSV.exe ----

Tue Oct 25 09:16:02 2011

INFO

Running extractData.exe version 0.3.5

Tue Oct 25 09:16:02 2011

INFO

Connecting to webreports at http://myWebReportServer

Tue Oct 25 09:16:02 2011

INFO

Loading Query Data.

Use of uninitialized value $displayThreshold in numeric eq (==) at BFExtractToCSV.pl line 349.

Use of uninitialized value $displayThreshold in numeric eq (==) at BFExtractToCSV.pl line 349.

Use of uninitialized value $displayThreshold in numeric eq (==) at BFExtractToCSV.pl line 349.

Use of uninitialized value $displayThreshold in numeric le (<=) at BFExtractToCSV.pl line 360.

Tue Oct 25 09:16:02 2011

INFO

Couldn’t interprate yml file: YAML::Tiny found illegal characters in plain scalar: ‘(concatenation “%22: %22” of substrings separated by ": " of it)’

SCALAR(0x378dd6c)

  • End output from running BFExtractToCSV.exe ----

(imported comment written by BenKus)

Ahh… Sorry… I thought your problem was in the results and not the query… Sorry, I was answering forum questions too quickly late at night… :slight_smile:

Instead, try escaping the “:” with percent encoding “%3a”:

(value of results (bes property whose (name of it = “IP Address Registration Address”) , it) | “”) of bes computers whose (exists values whose (it as lowercase = “mca”) of results (bes property “WMU%3a OU Site” , it))

Ben

(imported comment written by jpboisen91)

That fixed it. Thanks Ben.