Legacy Dev Forum Posts

 View Only

Sign Up

Twait missing when views are used

  • 1.  Twait missing when views are used

    Posted 06-05-2025 19:19

    matthew | 2017-06-28 13:06:23 UTC | #1

    Hi, Max from support told me to move the case across to the forum to get a better response :

    The error i receive is :

    tWait is not available because the query cannot be simplified to a set of entity selections

    Yet when i remove the views from this query, it works fine. The views are definitely interfering with the other metrics.

    The query using views which fails :

    { "interval": "2017-05-05T22:00:00.000Z/2017-05-21T22:30:00.000Z", "granularity": "PT30M", "groupBy": [ "mediaType", "queueId" ], "metrics": [ "tWait" ], "filter": { "type": "or", "predicates": [ { "dimension": "queueId", "value": "1f934114-1c7f-41c0-9a01-1135b86d04c6" } ] }, "views":[ {"function":"rangeBound","target":"tAnswered","name":"tAnswered20","range":{"gte":0.0,"lt":20000.0}}, {"function":"rangeBound","target":"tAnswered","name":"tAnsweredover20","range":{"gte":20100.0,"lt":3600000000.0}}, {"function":"rangeBound","target":"tAbandon","name":"tAbandon20","range":{"gte":0.0,"lt":20000.0}}, {"function":"rangeBound","target":"tAbandon","name":"tAbandonover20","range":{"gte":20100.0,"lt":3600000000.0}} ] }

    and this query without the views works fine :

    { "interval": "2017-05-05T22:00:00.000Z/2017-05-21T22:30:00.000Z", "granularity": "PT30M", "groupBy": [ "mediaType", "queueId" ], "metrics": [ "tWait" ], "filter": { "type": "or", "predicates": [ { "dimension": "queueId", "value": "1f934114-1c7f-41c0-9a01-1135b86d04c6" } ] } }

    How can we use views and get the twait time (and other metrics) in the same query?

    thanks.

    matthew


    tim.smith | 2017-06-28 13:55:34 UTC | #2

    This is a known issue, AR-4263. A fix has already been submitted and is pending release to production. Once that gets deployed, the query you have with views should work fine.


    matthew | 2017-06-29 19:31:21 UTC | #3

    thanks for the update Tim.


    system | 2017-07-30 19:31:59 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 1480