Skip to main content

Hi all,

 

Can PQL Statements be used in variables in a knowledge model?

In Process Analytics that works like in this example:

PQL Statement:

 

CASE 

 WHEN <%= PROCESS_GRANULARITY %> = '<%=PE_CENTER_ACTIVITY%>'

THEN <%= PROCESS_GRANULARITY %>

END

 

Variable <%= PROCESS_GRANULARITY %> :

 

CASE 

      WHEN PU_FIRST("TM_Activities", "TM_Labeled_Data"."AppView") != 'Unlabeled'

      THEN PU_FIRST("TM_Activities","TM_Labeled_Data"."AppView")

END

 

But I can't find a way to do this in a Knowledge model. Is there a way to do this with KM Variables or KPIs?

Thanks a lot!

@markus.herdi Did you take a look at the documentation? <your_team>.<cluster>/help/display/CIBC/KM+Variables

 

You define the variable id, eg.

  • id: PROCESS_GRANULARITY

value: Process Granularity

 

You then reference it:

 

CASE WHEN ${PROCESS_GRANULARITY} = 'X' THEN ...


Hi Samuel, thank you for your answer. Yes had a look at KM+Variables but it did not work before because I made a mistake in converting the code to yaml syntax. It is working now 🙂

So the request can be closed.

Best regards,

Markus


Maybe for others reading this post in case you are using the runtime variables the syntax is different --> ${{variable}} instead of ${variable}


Reply