(self, aggregate_dsl)
return aggregation_obj
Run an aggregation request on the sketch.

        Args:
            aggregate_dsl: OpenSearch aggregation query DSL string.

        Returns:
            An aggregation object (instance of Aggregation).

        Raises:
            ValueError: if unable to query for the results.
Run an aggregation request on the sketch.
Run an aggregation request on the sketch .
def aggregate(self, aggregate_dsl):
        """Run an aggregation request on the sketch.

        Args:
            aggregate_dsl: OpenSearch aggregation query DSL string.

        Returns:
            An aggregation object (instance of Aggregation).

        Raises:
            ValueError: if unable to query for the results.
        """
        if self.is_archived():
            raise ValueError(
                'Unable to run an aggregation on an archived sketch.')

        if not aggregate_dsl:
            raise RuntimeError(
                'You need to supply an aggregation query DSL string.')

        aggregation_obj = aggregation.Aggregation(sketch=self)
        aggregation_obj.from_manual(aggregate_dsl)

        return aggregation_obj
def aggregate ( self , aggregate_dsl ) : if self . is_archived ( ) : raise ValueError ( 'Unable to run an aggregation on an archived sketch.' ) if not aggregate_dsl : raise RuntimeError ( 'You need to supply an aggregation query DSL string.' ) aggregation_obj = aggregation . Aggregation ( sketch = self ) aggregation_obj . from_manual ( aggregate_dsl ) return aggregation_obj