src/datamigration/dags/redshift/redshift_transfer_run_log_dag.py [139:183]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        )
        logging.info(
            f"Method _get_transfer_run_summary: received transfer run summary as {transfer_summary}"
        )
        dts_run_summary_json["unique_id"] = unique_id
        dts_run_summary_json["transfer_config_id"] = transfer_config_id
        dts_run_summary_json["transfer_run_id"] = run_id
        dts_run_summary_json["transfer_run_status"] = transfer_summary["state"]
        dts_run_summary_json["error_message"] = transfer_summary["errorStatus"].get(
            "message", None
        )
        dts_run_summary_json["start_time"] = transfer_summary["startTime"]
        dts_run_summary_json["end_time"] = transfer_summary["endTime"]
        ti.xcom_push(key="dts_run_summary_json", value=dts_run_summary_json)
    except HttpError as err:
        logging.error("Error while requesting transfer run summary")
        logging.exception(err)
        raise err


def get_transfer_run_logs(
    full_run_id: str,
    next_page_token=None,
    page_size: int = 1000,
    page_iteration: int = 1,
    transfer_logs=[],
):
    """
    Calls DTS API to get transfer run logs
    """

    if page_iteration != 1 and next_page_token is None:
        logging.info(
            f"Method get_transfer_run_logs page {page_iteration}: skipping the request as no more logs to fetch. "
        )
        return transfer_logs

    try:
        response = (
            bq_data_transfer_client.projects()
            .locations()
            .transferConfigs()
            .runs()
            .transferLogs()
            .list(parent=full_run_id, pageSize=page_size, pageToken=next_page_token)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/datamigration/dags/teradata/teradata_transfer_run_log_dag.py [170:214]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        )
        logging.info(
            f"Method _get_transfer_run_summary: received transfer run summary as {transfer_summary}"
        )
        dts_run_summary_json["unique_id"] = unique_id
        dts_run_summary_json["transfer_config_id"] = transfer_config_id
        dts_run_summary_json["transfer_run_id"] = run_id
        dts_run_summary_json["transfer_run_status"] = transfer_summary["state"]
        dts_run_summary_json["error_message"] = transfer_summary["errorStatus"].get(
            "message", None
        )
        dts_run_summary_json["start_time"] = transfer_summary["startTime"]
        dts_run_summary_json["end_time"] = transfer_summary["endTime"]
        ti.xcom_push(key="dts_run_summary_json", value=dts_run_summary_json)
    except HttpError as err:
        logging.error("Error while requesting transfer run summary")
        logging.exception(err)
        raise err


def get_transfer_run_logs(
    full_run_id: str,
    next_page_token=None,
    page_size: int = 1000,
    page_iteration: int = 1,
    transfer_logs=[],
):
    """
    Calls DTS API to get transfer run logs
    """

    if page_iteration != 1 and next_page_token is None:
        logging.info(
            f"Method get_transfer_run_logs page {page_iteration}: skipping the request as no more logs to fetch. "
        )
        return transfer_logs

    try:
        response = (
            bq_data_transfer_client.projects()
            .locations()
            .transferConfigs()
            .runs()
            .transferLogs()
            .list(parent=full_run_id, pageSize=page_size, pageToken=next_page_token)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



