Skip to content

Sql Metric Expression which uses % has % duped in tableView query #274

@scophotog

Description

@scophotog

I created a sql metric with the expression:

CAST(strftime("%s", max("timestamp")) AS INT)

When I used this metric to create a table view the values were not being populated. Looking into the JSON I found the query had duplicated the %:

query: "SELECT "serviceName" AS "serviceName", CAST(strftime("%%s", max("timestamp")) AS INT)
 AS latest_date FROM "testResults" WHERE timestamp >= '2016-03-29 15:57:43.000000' AND timestamp <= '2016-04-05 15:57:43.000000' GROUP BY "serviceName" ORDER BY 
CAST(strftime("%%s", max("timestamp")) AS INT) DESC LIMIT 50000 OFFSET 0"

Current end result is this column ends up displaying a 0 for each entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions