From 0b2b5fc1b8a855c6f629dd80997aa7f6b226d591 Mon Sep 17 00:00:00 2001 From: Robert McMahan Date: Tue, 24 Sep 2024 17:45:14 -0400 Subject: [PATCH] Update to Handle Boolean Type First Party Labels --- backend/controller/ml_model/templates/model_bqml.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/controller/ml_model/templates/model_bqml.sql b/backend/controller/ml_model/templates/model_bqml.sql index 1fa4f56b2..418cb2b6a 100644 --- a/backend/controller/ml_model/templates/model_bqml.sql +++ b/backend/controller/ml_model/templates/model_bqml.sql @@ -254,8 +254,8 @@ aggregate_behavior AS ( FROM events AS e INNER JOIN user_variables AS uv ON e.unique_id = uv.unique_id - WHERE (uv.label > 0 AND e.date <= uv.trigger_date) - OR uv.label = 0 + WHERE (CAST(uv.label AS INT64) > 0 AND e.date <= uv.trigger_date) + OR CAST(uv.label AS INT64) = 0 GROUP BY 1 ), unified_dataset AS (