(self, name, description='', view_id=None)
return AggregationGroup(aggregation_group)
Add aggregation Group to the sketch.

        Args:
            name: the name of the aggregation run.
            description: optional description of the aggregation, visible in
                the UI.
            view_id: optional ID of the view to attach the aggregation to.
Add aggregation Group to the sketch.
Add aggregation Group to the sketch .
def add_aggregation_group(self, name, description='', view_id=None):
        """Add aggregation Group to the sketch.

        Args:
            name: the name of the aggregation run.
            description: optional description of the aggregation, visible in
                the UI.
            view_id: optional ID of the view to attach the aggregation to.
        """
        if not name:
            raise ValueError('Aggregator group name needs to be defined.')

        if view_id:
            view = View.query.get(view_id)
        else:
            view = None

        if not description:
            description = 'Created by an analyzer'

        aggregation_group = SQLAggregationGroup.get_or_create(
            name=name, description=description, user=None,
            sketch=self.sql_sketch, view=view)
        db_session.add(aggregation_group)
        db_session.commit()

        return AggregationGroup(aggregation_group)
def add_aggregation_group ( self , name , description = '' , view_id = None ) : if not name : raise ValueError ( 'Aggregator group name needs to be defined.' ) if view_id : view = View . query . get ( view_id ) else : view = None if not description : description = 'Created by an analyzer' aggregation_group = SQLAggregationGroup . get_or_create ( name = name , description = description , user = None , sketch = self . sql_sketch , view = view ) db_session . add ( aggregation_group ) db_session . commit ( ) return AggregationGroup ( aggregation_group )