Query: ValueArchive vs. NGA

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
4 posts • Page 1 of 1
tobias_raab
Posts: 12
Joined: Mon Feb 29, 2016 2:30 pm

Query: ValueArchive vs. NGA

Post by tobias_raab » Tue Feb 11, 2020 2:07 pm

Hi,

via the UI the user can query log messages depending on the log datapoint and msg type, ...

Looking like this:

// BUILD QUERY FOR "OLD" DATA
sQuery="SELECT ALL '.MsgKeyWord:_original.._stime', '.MsgType:_original.._value', '.MsgObject:_original.._value', '.MsgType:_original.._user', '.MsgType:_original.._manager', '.MsgKeyWord:_original.._value', '.MsgAttachment:_original.._value'"+
"FROM 'VPP_LOG_"+COMBO_LOGNAME.selectedText()+"'"+
"WHERE _DPT = \"VPP_LOG\" ";

// ADD USER INPUT AS FILTERS
if(COMBO_USERS.text()!="*")
sQuery+="AND '.MsgType:_original.._user' LIKE \""+(string)getUserId(COMBO_USERS.text())+"\" ";
if(COMBO_OBJECT.text()!="*")
sQuery+="AND '.MsgObject:_original.._value' LIKE \""+COMBO_OBJECT.text()+"\" ";
if(COMBO_TYPE.text()!="*")
sQuery+="AND '.MsgType:_original.._value' == '"+COMBO_TYPE.text()+"'";
if(TEXTFIELD_MESSAGEATTACHMENT.text()!="*")
sQuery+="AND '.MessageAttachment:_original.._value' LIKE \"*"+TEXTFIELD_MESSAGEATTACHMENT.text()+"*\" ";

// SET TIMERANGE
sQuery+="TIMERANGE(\""+(string)DATETIME_FROM.dateTime()+"\",\""+(string)DATETIME_TO.dateTime()+"\",1,1) SORT BY 0";

// USE dpQuersSplit TO GET ALL DATA FOR THE LOG FILE
while ((iProgress < 100) && !iErr)
{
iErr = dpQuerySplit(iReqID, iProgress, sQuery, ddynaRet);
dynRemove(ddynaRet, 1);
dynAppend(ddynaLog, ddynaRet);
}

Executing the query in v3.17 using NGA results in this error messages:
WCCOAnextgenarch(118), 2020.02.11 15:01:32.737, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgKeyWord:_original.._stime" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.751, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgType:_original.._value" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.752, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgObject:_original.._value" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.768, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgType:_original.._user" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.783, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgType:_original.._manager" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.799, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgKeyWord:_original.._value" to a valid DpIdentifier. The attribute will not be queried.
WCCOAnextgenarch(118), 2020.02.11 15:01:32.815, IMPL, SEVERE, 0, , Could not convert the attribute name ".MsgAttachment:_original.._value" to a valid DpIdentifier. The attribute will not be queried.
WCCOAui (1), 2020.02.11 15:01:32.831, CTRL, SEVERE, 5/ctrl, Ort der folgenden Meldung:
Module: _QuickTest_
Panel: Z:\WinCCOA\317\VPPController_317_DEV\panels\DIAGNOSIS\VPP_DIAG_LOG.xml [DIAGNOSIS\VPP_DIAG_LOG.xml]
Script: Initialize
In panel scope library: DIAGNOSIS\VPP_DIAG_LOG.xml []
Line: 36
WCCOAui (1), 2020.02.11 15:01:32.815, SYS, SEVERE, 0, , dpQuery(Split): can not convert any attribute name to a valid DpIdentifier. The query will be aborted.

Executing the query in v3.16 using ArchiveValues is returning no errors


Is this a problem with 3.17 or with using NGA / InfluxDB?

Best regards,
Tobias Raab

User avatar
leoknipp
Posts: 2209
Joined: Tue Aug 24, 2010 5:28 pm

Re: Query: ValueArchive vs. NGA

Post by leoknipp » Tue Feb 11, 2020 4:01 pm

It looks like a problem in NGA in 3.17.
We will do some tests with NGA to check the functionality.

Info: If you want to query historical data please only use SELECT and for alerts SELECT ALERT. SELECT ALL must not be used.

Best Regards
Leopold Knipp
Senior Support Specialist

tobias_raab
Posts: 12
Joined: Mon Feb 29, 2016 2:30 pm

Re: Query: ValueArchive vs. NGA

Post by tobias_raab » Wed Feb 12, 2020 6:50 am

Hello Mr. Knipp,

could you explain why SELECT ALL should not be used? The help files states:

The ALL argument is used to read all archived data from the DB (using the Timerange argument on the Timerange tab you can specify the period for the query). If you do not specify a Timerange or ALL, the query returns current values from the DB.

Your suggestion is to use SELECT + TImerange? Is there a performance difference between SELECT ALL + TImerange and SELECT + Timerange?

Please keep me posted concerning the NGAissue. Thank you very much!

Best regards,
Tobias Raab

User avatar
leoknipp
Posts: 2209
Joined: Tue Aug 24, 2010 5:28 pm

Re: Query: ValueArchive vs. NGA

Post by leoknipp » Wed Feb 12, 2020 8:02 am

If you want to get historical data you must use SELECT + TIMERANGE.
Possibly there is no performance difference when using SELECT + TIMERANGE and SELECT ALL + TIMERANGE if the same time range is used.
I cannot give you more detailed information as I never did a comparsion because normally only SELECT + TIMERANGE is used.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
4 posts • Page 1 of 1