From 5ac01851ae700717340dd89fe0b1fc58f138fb2b Mon Sep 17 00:00:00 2001 From: David Xue Date: Tue, 19 Mar 2024 15:28:06 -0400 Subject: [PATCH] Change firestore metric field name to load to snowflake --- airflow/dags/metrcis/load_firestore_to_snowflake.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airflow/dags/metrcis/load_firestore_to_snowflake.py b/airflow/dags/metrcis/load_firestore_to_snowflake.py index ef9c89d2..0b851aa3 100644 --- a/airflow/dags/metrcis/load_firestore_to_snowflake.py +++ b/airflow/dags/metrcis/load_firestore_to_snowflake.py @@ -49,8 +49,8 @@ def load_request_data_from_firestore() -> list[tuple[str, int, bool, int]]: end_ts = time.mktime(yesterday.timetuple()) docs = ( - requests_col.where(filter=FieldFilter("response_received_at", ">=", start_ts)) - .where(filter=FieldFilter("response_received_at", "<", end_ts)) + requests_col.where(filter=FieldFilter("sent_at", ">=", start_ts)) + .where(filter=FieldFilter("sent_at", "<", end_ts)) .stream() ) @@ -60,9 +60,9 @@ def load_request_data_from_firestore() -> list[tuple[str, int, bool, int]]: uuid = doc_dict["uuid"] score = doc_dict.get("score") status = doc_dict.get("status") == "complete" - response_received_at = datetime.fromtimestamp(doc_dict.get("response_received_at")) + sent_at = datetime.fromtimestamp(doc_dict.get("sent_at")) client = doc_dict.get("client") - rows.append((uuid, score, status, response_received_at, client)) + rows.append((uuid, score, status, sent_at, client)) return rows