def _render_conditions(conditions):

    if not conditions:
        return ""

    rendered_conditions = []

    for condition in conditions:
        field = condition.get('field')
        field_type = condition.get('type')
        comparators = condition.get('comparators')

        if None in (field, field_type, comparators) or not comparators:
            logger.warn('Invalid condition passed in: %s' % condition)
            continue

        rendered_conditions.append(
            _render_condition(field, field_type, comparators))

    if not rendered_conditions:
        return ""

    return "WHERE %s" % (" AND ".join(rendered_conditions))
Render the conditions part of a query.
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/query_builder.py/_render_conditions