def _render_condition_value(value, field_type):

    # BigQuery cannot cast strings to booleans, convert to ints
    if field_type == "BOOLEAN":
        value = 1 if value else 0
    elif field_type in ("STRING", "INTEGER", "FLOAT"):
        value = "'%s'" % (value)
    elif field_type in ("TIMESTAMP"):
        value = "'%s'" % (str(value))
    return "%s(%s)" % (field_type, value)
Render a query condition value.
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/query_builder.py/_render_condition_value