cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Business iQ (Analytics)

Is it possible to have "NOT LIKE" in ADQLs?

Sanjay.Girotra
Producer

Is it possible to have "NOT LIKE" in ADQLs?

Hi,

I understand below query is possible:

SELECT count(*) FROM synth_session_records WHERE failureType = "Test location is currently unavailable" AND measurementSpec.scheduleName REGEXP "Test-job.*"

 

But is this possible:

SELECT count(*) FROM synth_session_records WHERE failureType = "Test location is currently unavailable" AND measurementSpec.scheduleName REGEXP NOT-LIKE "Test-job.*"

 

Refer below docs:

https://docs.appdynamics.com/display/PRO45/Analytics+Synthetic+Sessions+Data

https://docs.appdynamics.com/display/PRO45/REGEXP+Operator

 

Thanks.

By replying you agree to the Terms and Conditions of the AppDynamics Community.
Is it possible to have "NOT LIKE" in ADQLs?
3 REPLIES 3
Mika.Sasaki
AppDynamics Team

Thanks for posting the question on the Community.

 

NOT LIKE and REGEXP cannot be used at the same time.

dot(.)+asterisk(*) in REGEXP is equal to asterisk(*) in LIKE phrase, so you can use NOT LIKE “Test-job.*“.

“The asterisk(*) character matches zero or more characters. ” as in the document

https://docs.appdynamics.com/display/PRO45/Comparison+Operators

 

Please refer to the following SQL :

SELECT count() FROM synth_session_records WHERE failureType = “Test location is currently unavailable” AND measurementSpec.scheduleName NOT LIKE “Test-job.*“

 

Let me know if this helped you.

 

Many thanks,

Mika

Sanjay.Girotra
Producer

Thanks for the response Mika.

Although it accepted "NOT LIKE", below query worked:

SELECT count(*) FROM synth_session_records WHERE failureType = "Test location is currently unavailable" AND measurementSpec.scheduleName NOT LIKE "Equity*".

Note the missing Dot in NOT LIKE clause after Equity.

 

So far so good, the follow up question is how to ignore many patterns, say,

SELECT count(*) FROM synth_session_records WHERE failureType = "Test location is currently unavailable" AND measurementSpec.scheduleName NOT LIKE "Test*|Equity*|Find*"

NOT-Like-ADQL-2.JPG

 

NOT-Like-ADQL.JPG

 

 

Mika.Sasaki
AppDynamics Team

Hi Sanjay,

Unfortunately, regular expression cannot be used with "NOT LIKE".

Please refer to the following SQL :

SELECT count(*) FROM synth_session_records WHERE failureType = "Test location is currently unavailable" AND (measurementSpec.scheduleName NOT LIKE "Test*" OR measurementSpec.scheduleName NOT LIKE "Equity*" OR measurementSpec.scheduleName NOT LIKE "Find*")


Let me know if this helped you.


Many thanks,

Mika