diff --git a/airflow/dags/metrcis/load_firestore_to_snowflake.py b/airflow/dags/metrcis/load_firestore_to_snowflake.py index 615e7093..ef9c89d2 100644 --- a/airflow/dags/metrcis/load_firestore_to_snowflake.py +++ b/airflow/dags/metrcis/load_firestore_to_snowflake.py @@ -61,7 +61,8 @@ def load_request_data_from_firestore() -> list[tuple[str, int, bool, int]]: score = doc_dict.get("score") status = doc_dict.get("status") == "complete" response_received_at = datetime.fromtimestamp(doc_dict.get("response_received_at")) - rows.append((uuid, score, status, response_received_at)) + client = doc_dict.get("client") + rows.append((uuid, score, status, response_received_at, client)) return rows @@ -77,9 +78,9 @@ def write_request_data_to_snowflake(rows: list[tuple[str, int, bool, int]]) -> N insert_sql = f""" INSERT INTO - {METRICS_SNOWFLAKE_DB_DATABASE}.{METRICS_SNOWFLAKE_DB_SCHEMA}.request(uuid, score, success, created_at) + {METRICS_SNOWFLAKE_DB_DATABASE}.{METRICS_SNOWFLAKE_DB_SCHEMA}.request(uuid, score, success, created_at, client) VALUES - (?, ?, ?, ?) + (?, ?, ?, ?, ?) """ conn.cursor().executemany(insert_sql, rows)