Answer by eric melski · Jun 22, 2012 at 02:08 PM
You can find descriptions of all the fields supported in the build results query in the cmtool Reference and User Guide (link is to the 6.1 version of the document, other versions can be found from the Electric Cloud documentation index). Look in the section that describes the `getBuilds` command.
The syntax of the custom query is described inline in the Cluster Manager UI when you go to edit the custom query:
The query value is an SQL where clause, which may contain special parameters to be replaced by user input. The format for these paramaters is {{<label>|<type>}} where <label> is the unique label to use for the parameter, and is one of: datetime, datetimeam, datetimepm, integer, integerrequired, float, floatrequired, buildclass, table, shorttext, shorttextrequired, noescape, noescaperequired, text or textrequired. You can also use {{currentUser}} to insert the name of the currently logged in user.
Which is to say, the query is basically standard SQL with a little bit of preprocessing to make it easier for you to parameterize (so you don't have to keep directly editing the SQL if you just want to run the same query for different values).
You can also look at the queries for the built-in filters for examples, by selecting a filter and clicking the "Edit Filter" button in the UI. Here's the query for the "Build Class" filter, which selects all builds matching a specified build class:
build_class_name LIKE('{{Build Class:|buildclass}}')
Here's the query for the "Last 24 Hours" filter, which selects all builds started in the last 24 hours:
start_time >= '{{yesterdayTime}}'
Note that since you only have control over the `WHERE` portion of the query, you are limited to queries against the `ec_builds` table in this context. Of course you can access other tables by running filters on the corresponding page in the UI (ie, to run queries against the `ec_agents` table, go to the "Agents" page).
Why are Cluster Manager queries slowing down? 1 Answer
How do I tell what database schema version my ElectricAccelerator Cluster Manager is using? 1 Answer
Failing to load Oracle 11gR2 driver when installing Cluster Manager 7.2 1 Answer
When should I consider switching the Accelerator database from MySQL to Oracle or MSSQL? 1 Answer
Electric Cloud powers Continuous Delivery, helping organizations developing deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions to boost DevOps productivity and Agile throughput.