Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
my measure is used to calculate latest distinct table names
here i dont the measure to calculate when job_status is selected
so i provided my measure like
=Count(DISTINCT {<job_pattern={'BATCH'},job_status=> }If(Aggr(NODISTINCT Max(event_timestamp), job_id) = event_timestamp and (job_status ='FAILED' or job_status ='KILLED'), tb_name))
but its not working( i think since i am fetching the tb_name within the if statement)
FYI—-It is working if i am removing this if condition=Count(DISTINCT {<job_pattern={'BATCH'},job_status=> }tb_name)
Thanks for your help!
Hi, I think you will need to ignore the job_satuts field in every field, maybe:
=Count(DISTINCT {<job_pattern={'BATCH'},job_status=> }If(Aggr(NODISTINCT Max({<job_status=>} event_timestamp), job_id) = Only({<job_status={'FAILED','KILLED'}>} event_timestamp), tb_name))
Also I'm not sure if that 'If' would work in that syntax, maybe it needs to be enclosed in another aggr, a sample app would be nice to make some tests.
Hi, I think you will need to ignore the job_satuts field in every field, maybe:
=Count(DISTINCT {<job_pattern={'BATCH'},job_status=> }If(Aggr(NODISTINCT Max({<job_status=>} event_timestamp), job_id) = Only({<job_status={'FAILED','KILLED'}>} event_timestamp), tb_name))
Also I'm not sure if that 'If' would work in that syntax, maybe it needs to be enclosed in another aggr, a sample app would be nice to make some tests.
Hey it works when i use that within the aggr function
Aggr(NODISTINCT Max({<job_status=>} event_timestamp), job_id)
thank you