Skip to content

createAggregationsOnDataset (Array Creation & Manipulation)

Compatible with:
  • Purpose
  • This command allows you to perform aggregations on Datasets and get the results stored into a new target Dataset that is passed into the target field of the instruction.

    The Dataset used in target field has to be created anywhere in run time before this command gets executed. Else, the test run gets aborted saying "For one or more Instructions within the Test Script "<Test Script name>" that use the "<Array Creation & Manipulation Command>" command, the Dataset name provided in the 'Target' field does NOT exist in the scope of the Test Scenario" message.
  • The dataset on which the aggregation is performed should be mentioned in the 'FROM' clause of the query string (see below).
    SELECT Column1, Column2, mean(Column3), sum(Column4)
    FROM <DatasetName>
    GROUP BY Column1, Column2

    If there is more than one dataset is used in the aggregationQueryString, the list of datasets that are used in the aggregationQueryString should be mentioned separately in Value field separated by "||" symbol.

  • SELECT d1.Column1, d2.Column2 from dataset d1 inner join dataset2 d2 on (d1.Column1=d2.Month)||dataset,dataset2

    This sort of command will help create summaries that they can be either attached to emails or printed into the email body of emails that get sent from test run context. 
  • Syntax
  • createAggregationsOnDataset(datasetName,aggregationQueryString)
  • Target
  • datasetName
  • Value
  • aggregationQueryString( comma separated values in case of multiple labels)
  • Return Value
  • N/A
 

Feedback and Knowledge Base