How to use the pydruid.utils.having.Aggregation function in pydruid

To help you get started, we’ve selected a few pydruid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / incubator-superset / superset / connectors / druid / models.py View on Github external
def _get_having_obj(self, col: str, op: str, eq: str) -> "Having":
        cond = None
        if op == "==":
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == ">":
            cond = Aggregation(col) > eq
        elif op == "<":
            cond = Aggregation(col) < eq

        return cond
github apache / incubator-superset / caravel / models.py View on Github external
def _get_having_obj(self, col, op, eq):
        cond = None
        if op == '==':
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == '>':
            cond = Aggregation(col) > eq
        elif op == '<':
            cond = Aggregation(col) < eq

        return cond
github apache / incubator-superset / superset / models.py View on Github external
def _get_having_obj(self, col, op, eq):
        cond = None
        if op == '==':
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == '>':
            cond = Aggregation(col) > eq
        elif op == '<':
            cond = Aggregation(col) < eq

        return cond
github apache / incubator-superset / superset / models.py View on Github external
def _get_having_obj(self, col, op, eq):
        cond = None
        if op == '==':
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == '>':
            cond = Aggregation(col) > eq
        elif op == '<':
            cond = Aggregation(col) < eq

        return cond
github apache / incubator-superset / caravel / models.py View on Github external
def _get_having_obj(self, col, op, eq):
        cond = None
        if op == '==':
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == '>':
            cond = Aggregation(col) > eq
        elif op == '<':
            cond = Aggregation(col) < eq

        return cond
github apache / incubator-superset / superset / connectors / druid / models.py View on Github external
def _get_having_obj(self, col: str, op: str, eq: str) -> "Having":
        cond = None
        if op == "==":
            if col in self.column_names:
                cond = DimSelector(dimension=col, value=eq)
            else:
                cond = Aggregation(col) == eq
        elif op == ">":
            cond = Aggregation(col) > eq
        elif op == "<":
            cond = Aggregation(col) < eq

        return cond