ESQL String Aggregate

Monday, May 23, 2022
Avatar

Hello,

I am trying to create an ESQL query that groups  the results by the Test Case ID. For example, if I have the following table:

Test Case IDRequirement
1RQ1
1RQ2
2RQ3
2RQ4

 

I want an ESQL query the groups the Requirements by Test Case ID and outputs:

Test Case IDRequirement
1RQ1, RQ2
2RQ3, RQ4

 

For SQL, it appears that the query would be:

SELECT TEST_CASE_ID, STRING_AGG(REQUIREMENT_NAME,',') AS REQUIREMENTS

FROM SpiraTestEntities.R_RequirementTestCases

GROUP BY TEST_CASE_ID

However, ESQL removed the STRING_AGG function. Is there another way to do this?

1 Replies
Tuesday, May 24, 2022
Avatar
re: jacob.d.carbajal Monday, May 23, 2022

I don't think ESQL supports that I'm afraid.

You may want to simply group by requirement name and then use XSLT to do the further aggregating and grouping.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Monday, May 23, 2022
  • Last Reply: Tuesday, May 24, 2022
  • Replies: 1
  • Views: 424