Unknown column ‘INSPECT_ID‘ in ‘field list‘ 错误解决

本文记录了一次因SQL语句中缺少空格导致的接口请求错误,详细介绍了排查过程及最终解决办法。

        今天年后上班,postman验证别人的写的一个详情接口,请求报错出现“Unknown column 'INSPECT_ID' in 'field list'”。

 

        反复验证数据库和实体类字段是否一致,数据库字段是否有空格换行,实体类的映射是否正确,都没有问题。无果上网查询也都是以下几种说法:

1.数据库和实体类字段不一致。
2.实体中的属性对应在数据库中的某个字段缺失。
3.字段带有空格或者回车。
4.数据库连错了。

  没办法,我试着把sql放到mysql中执行看看,结果发现是sql中from关键字前没有空格。。。

 添加空格后正常

 真是乌龙,虽然不是自己的错误,也得引以为戒,今后写代码要细心。。。

 

 

`Stack BSW Unanalyzed`, `Stack Total`, `BSW Involve`, `BSW Involve Unclosed`, `HorizontalExpansion Count`, `HorizontalExpansion PN`, `HorizontalExpansion Unfinished`, `HorizontalExpansion Delay`, `BSW Analysis Conclusions`, `Stack Classification`, `BSW Reason Classification`, `BSW Analyzed`, `BSW Unanalyzed`, `BSW Staff List`, `Found By Classification`, `High Priority Unanalyzed`, `Stack_Analyzed`, `Stack_Unanalyzed`, update_over_15, update_over_7, `Responsible`, `Email`) VALUES (%(Summary_m0)s, %(Issue_key_m0)s, %(Issue_id_m0)s, %(Parent_id_m0)s, %(Issue_Type_m0)s, %(Status_m0)s, %(Project_key_m0)s, %(Project_name_m0)s, %(Project_type_m0)s, %(Project_lead_m0)s, %(Project_description_m0)s, %(Project_url_m0)s, %(Priority_m0)s, %(Resolution_m0)s, %(Assignee_m0)s, %(Reporter_m0)s, %(Creator_m0)s, %(Created_m0)s, %(Updated_m0)s, %(Last_Viewed_m0)s, %(Resolved_m0)s, %(Affects_Version/s_m0)s, %(Fix_Version/s_m0)s, %(Component/s_m0)s, %(Due_Date_m0)s, %(Labels_m0)s, %(Description_m0)s, %(Environment_m0)s, %(Watchers_m0)s, %(Log_Work_m0)s, %(Security_Level_m0)s, %(Attachment_m0)s, %(total_m0)s, %(Custom_field_AControl_NoZ_m0)s, %(Custom_field_ACustom_1Z_m0)s, %(Custom_field_ACustom_2Z_m0)s, %(Custom_field_ADate_of_first_ResponseZ_m0)s, %(Custom_field_AExperience_OwnerZ_m0)s, %(Custom_field_AFixed_in_releaseZ_m0)s, %(Custom_field_AFound_ByZ_m0)s, %(Custom_field_AFound_in_HW_versionZ_m0)s, %(Custom_field_AFound_in_SW_versionZ_m0)s, %(Custom_field_AKOCHI_Issue_TypeZ_m0)s, %(Custom_field_AKOCHI_Issue_Type_TransitionZ_m0)s, %(Custom_field_ALast_CommentZ_m0)s, %(Custom_field_AMatterZ_m0)s, %(Custom_field_AProject_NumberZ_m0)s, %(Custom_field_ARankZ_m0)s, %(Custom_field_ARealisation_plannedZ_m0)s, %(Custom_field_AReport_NumberZ_m0)s, %(Custom_field_AReport_TypeZ_m0)s, %(Custom_field_AReported_ByZ_m0)s, %(Custom_field_ARiskZ_m0)s, %(Custom_field_AStart_DateZ_m0)s, %(Custom_field_ATeamZ_m0)s, %(Comment_m0)s, %(Involvement_of_BSW_m0)s, %(Date_m0)s, %(ProjectNum_m0)s, %(BSW_Self_Test_m0)s, %(BSW_Issue_m0)s, %(Stack_BSW_Analyzed_m0)s, %(Stack_BSW_Unanalyzed_m0)s, %(Stack_Total_m0)s, %(BSW_Involve_m0)s, %(BSW_Involve_Unclosed_m0)s, %(HorizontalExpansion_Count_m0)s, %(HorizontalExpansion_PN_m0)s, %(HorizontalExpansion_Unfinished_m0)s, %(HorizontalExpansion_Delay_m0)s, %(BSW_Analysis_Conclusions_m0)s, %(Stack_Classification_m0)s, %(BSW_Reason_Classification_m0)s, %(BSW_Analyzed_m0)s, %(BSW_Unanalyzed_m0)s, %(BSW_Staff_List_m0)s, %(Found_By_Classification_m0)s, %(High_Priority_Unanalyzed_m0)s, %(Stack_Analyzed_m0)s, %(Stack_Unanalyzed_m0)s, %(update_over_15_m0)s, %(update_over_7_m0)s, %(Responsible_m0)s, %(Email_m0)s) AS new ON DUPLICATE KEY UPDATE `Summary` = new.`Summary`, `Issue id` = new.`Issue id`, `Parent id` = new.`Parent id`, `Issue Type` = new.`Issue Type`, `Status` = new.`Status`, `Project key` = new.`Project key`, `Project name` = new.`Project name`, `Project type` = new.`Project type`, `Project lead` = new.`Project lead`, `Project description` = new.`Project description`, `Project url` = new.`Project url`, `Priority` = new.`Priority`, `Resolution` = new.`Resolution`, `Assignee` = new.`Assignee`, `Reporter` = new.`Reporter`, `Creator` = new.`Creator`, `Created` = new.`Created`, `Updated` = new.`Updated`, `Last Viewed` = new.`Last Viewed`, `Resolved` = new.`Resolved`, `Affects Version/s` = new.`Affects Version/s`, `Fix Version/s` = new.`Fix Version/s`, `Component/s` = new.`Component/s`, `Due Date` = new.`Due Date`, `Labels` = new.`Labels`, `Description` = new.`Description`, `Environment` = new.`Environment`, `Watchers` = new.`Watchers`, `Log Work` = new.`Log Work`, `Security Level` = new.`Security Level`, `Attachment` = new.`Attachment`, total = new.total, `Custom field (Control No)` = new.`Custom field (Control No)`, `Custom field (Custom_1)` = new.`Custom field (Custom_1)`, `Custom field (Custom_2)` = new.`Custom field (Custom_2)`, `Custom field (Date of first Response)` = new.`Custom field (Date of first Response)`, `Custom field (Experience Owner)` = new.`Custom field (Experience Owner)`, `Custom field (Fixed in release)` = new.`Custom field (Fixed in release)`, `Custom field (Found By)` = new.`Custom field (Found By)`, `Custom field (Found in HW version)` = new.`Custom field (Found in HW version)`, `Custom field (Found in Mech Version)` = new.`Custom field (Found in Mech Version)`, `Custom field (Found in SVN version)` = new.`Custom field (Found in SVN version)`, `Custom field (Found in SW version)` = new.`Custom field (Found in SW version)`, `Custom field (KOCHI Issue Type)` = new.`Custom field (KOCHI Issue Type)`, `Custom field (KOCHI Issue Type Transition)` = new.`Custom field (KOCHI Issue Type Transition)`, `Custom field (Last Comment)` = new.`Custom field (Last Comment)`, `Custom field (Matter)` = new.`Custom field (Matter)`, `Custom field (Project Number)` = new.`Custom field (Project Number)`, `Custom field (Project Number P)` = new.`Custom field (Project Number P)`, `Custom field (Rank)` = new.`Custom field (Rank)`, `Custom field (Realisation planned)` = new.`Custom field (Realisation planned)`, `Custom field (Report Number)` = new.`Custom field (Report Number)`, `Custom field (Report Type)` = new.`Custom field (Report Type)`, `Custom field (Reported By)` = new.`Custom field (Reported By)`, `Custom field (Risk)` = new.`Custom field (Risk)`, `Custom field (Start Date)` = new.`Custom field (Start Date)`, `Custom field (Team)` = new.`Custom field (Team)`, `Comment` = new.`Comment`, `Involvement of BSW` = new.`Involvement of BSW`, `Date` = new.`Date`, `ProjectNum` = new.`ProjectNum`, `BSW Self Test` = new.`BSW Self Test`, `BSW Issue` = new.`BSW Issue`, `Stack BSW Analyzed` = new.`Stack BSW Analyzed`, `Stack BSW Unanalyzed` = new.`Stack BSW Unanalyzed`, `Stack Total` = new.`Stack Total`, `BSW Involve` = new.`BSW Involve`, `BSW Involve Unclosed` = new.`BSW Involve Unclosed`, `HorizontalExpansion Count` = new.`HorizontalExpansion Count`, `HorizontalExpansion PN` = new.`HorizontalExpansion PN`, `HorizontalExpansion Unfinished` = new.`HorizontalExpansion Unfinished`, `HorizontalExpansion Delay` = new.`HorizontalExpansion Delay`, `BSW Analysis Conclusions` = new.`BSW Analysis Conclusions`, `Stack Classification` = new.`Stack Classification`, `BSW Reason Classification` = new.`BSW Reason Classification`, `BSW Analyzed` = new.`BSW Analyzed`, `BSW Unanalyzed` = new.`BSW Unanalyzed`, `BSW Staff List` = new.`BSW Staff List`, `Found By Classification` = new.`Found By Classification`, `High Priority Unanalyzed` = new.`High Priority Unanalyzed`, `Stack_Analyzed` = new.`Stack_Analyzed`, `Stack_Unanalyzed` = new.`Stack_Unanalyzed`, update_over_15 = new.update_over_15, update_over_7 = new.update_over_7, `Responsible` = new.`Responsible`, `Email` = new.`Email`] [parameters: {'Summary_m0': 'KOCHI_LL-738: LL_BYD_UWB Communication Distance Issue', 'Issue_key_m0': 'P09192-3', 'Issue_id_m0': '1315369', 'Parent_id_m0': '1302030.0', 'Issue_Type_m0': 'Sub-ToDo', 'Status_m0': 'Closed', 'Project_key_m0': 'P09192', 'Project_name_m0': 'P09192 GWM_BLE_BNWC_P14', 'Project_type_m0': 'software', 'Project_lead_m0': 'wang161', 'Project_description_m0': '', 'Project_url_m0': '', 'Priority_m0': 'Medium', 'Resolution_m0': "Won't Do", 'Assignee_m0': 'liu033', 'Reporter_m0': 'yu017', 'Creator_m0': 'yu017', 'Created_m0': Timestamp('2025-06-12 08:11:00'), 'Updated_m0': Timestamp('2025-06-16 04:38:00'), 'Last_Viewed_m0': Timestamp('2025-11-24 19:24:00'), 'Resolved_m0': Timestamp('2025-06-16 04:38:00'), 'Affects_Version/s_m0': '', 'Fix_Version/s_m0': '', 'Component/s_m0': '', 'Due_Date_m0': Timestamp('2025-07-10 00:00:00'), 'Labels_m0': '', 'Description_m0': 'Please check the relevance of KOCHI_LL-738 in the project\n\n*Evidence:*\r\nThe isolation between the UWB and BLE antennas must be greater than 10 dB for future designs', 'Environment_m0': '', 'Watchers_m0': '', 'Log_Work_m0': '', 'Security_Level_m0': '', 'Attachment_m0': '', 'total_m0': 0, 'Custom_field_AControl_NoZ_m0': '', 'Custom_field_ACustom_1Z_m0': '', 'Custom_field_ACustom_2Z_m0': '', 'Custom_field_ADate_of_first_ResponseZ_m0': None, 'Custom_field_AExperience_OwnerZ_m0': '', 'Custom_field_AFixed_in_releaseZ_m0': '', 'Custom_field_AFound_ByZ_m0': '', 'Custom_field_AFound_in_HW_versionZ_m0': '', 'Custom_field_AFound_in_SW_versionZ_m0': '', 'Custom_field_AKOCHI_Issue_TypeZ_m0': '', 'Custom_field_AKOCHI_Issue_Type_TransitionZ_m0': '', 'Custom_field_ALast_CommentZ_m0': '', 'Custom_field_AMatterZ_m0': 'Hardware', 'Custom_field_AProject_NumberZ_m0': '', 'Custom_field_ARankZ_m0': '1|i47fog:', 'Custom_field_ARealisation_plannedZ_m0': '', 'Custom_field_AReport_NumberZ_m0': '', 'Custom_field_AReport_TypeZ_m0': '', 'Custom_field_AReported_ByZ_m0': '', 'Custom_field_ARiskZ_m0': '', 'Custom_field_AStart_DateZ_m0': '', 'Custom_field_ATeamZ_m0': '', 'Comment_m0': '16.06.2025 04:38;yu017;N/A\r\n\r\nno UWB;;;', 'Involvement_of_BSW_m0': 'No', 'Date_m0': Timestamp('2025-11-25 02:24:10'), 'ProjectNum_m0': 'P09192', 'BSW_Self_Test_m0': 0, 'BSW_Issue_m0': 0, 'Stack_BSW_Analyzed_m0': 0, 'Stack_BSW_Unanalyzed_m0': 0, 'Stack_Total_m0': 0, 'BSW_Involve_m0': 0, 'BSW_Involve_Unclosed_m0': 0, 'HorizontalExpansion_Count_m0': 0, 'HorizontalExpansion_PN_m0': None, 'HorizontalExpansion_Unfinished_m0': 0, 'HorizontalExpansion_Delay_m0': 0, 'BSW_Analysis_Conclusions_m0': 'Non-BSW', 'Stack_Classification_m0': 'Unclassed', 'BSW_Reason_Classification_m0': '底层未参与分析', 'BSW_Analyzed_m0': 0, 'BSW_Unanalyzed_m0': 0, 'BSW_Staff_List_m0': 'No', 'Found_By_Classification_m0': 'Others', 'High_Priority_Unanalyzed_m0': 0, 'Stack_Analyzed_m0': 0, 'Stack_Unanalyzed_m0': 0, 'update_over_15_m0': 0, 'update_over_7_m0': 0, 'Responsible_m0': 'Bob', 'Email_m0': 'bob@example.com'}] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-11-25 17:25:01,783 - ERROR - 行级操作失败: P09192-2, (pymysql.err.OperationalError) (1054, "Unknown column 'new.Custom field (Found in Mech Version)' in 'field list'") [SQL: INSERT INTO jira_task_bsw_deal (`Summary`, `Issue key`, `Issue id`, `Parent id`, `Issue Type`, `Status`, `Project key`, `Project name`, `Project type`, `Project lead`, `Project description`, `Project url`, `Priority`, `Resolution`, `Assignee`, `Reporter`, `Creator`, `Created`, `Updated`, `Last Viewed`, `Resolved`, `Affects Version/s`, `Fix Version/s`, `Component/s`, `Due Date`, `Labels`, `Description`, `Environment`, `Watchers`, `Log Work`, `Security Level`, `Attachment`, total, `Custom field (Control No)`, `Custom field (Custom_1)`, `Custom field (Custom_2)`, `Custom field (Date of first Response)`, `Custom field (Experience Owner)`, `Custom field (Fixed in release)`, `Custom field (Found By)`, `Custom field (Found in HW version)`, `Custom field (Found in SW version)`, `Custom field (KOCHI Issue Type)`, `Custom field (KOCHI Issue Type Transition)`, `Custom field (Last Comment)`, `Custom field (Matter)`, `Custom field (Project Number)`, `Custom field (Rank)`, `Custom field (Realisation planned)`, `Custom field (Report Number)`, `Custom field (Report Type)`, `Custom field (Reported By)`, `Custom field (Risk)`, `Custom field (Start Date)`, `Custom field (Team)`, `Comment`, `Involvement of BSW`, `Date`, `ProjectNum`, `BSW Self Test`, `BSW Issue`, `Stack BSW Analyzed`, `Stack BSW Unanalyzed`, `Stack Total`, `BSW Involve`, `BSW Involve Unclosed`, `HorizontalExpansion Count`, `HorizontalExpansion PN`, `HorizontalExpansion Unfinished`, `HorizontalExpansion Delay`, `BSW Analysis Conclusions`, `Stack Classification`, `BSW Reason Classification`, `BSW Analyzed`, `BSW Unanalyzed`, `BSW Staff List`, `Found By Classification`, `High Priority Unanalyzed`, `Stack_Analyzed`, `Stack_Unanalyzed`, update_over_15, update_over_7, `Responsible`, `Email`) VALUES (%(Summary_m0)s, %(Issue_key_m0)s, %(Issue_id_m0)s, %(Parent_id_m0)s, %(Issue_Type_m0)s, %(Status_m0)s, %(Project_key_m0)s, %(Project_name_m0)s, %(Project_type_m0)s, %(Project_lead_m0)s, %(Project_description_m0)s, %(Project_url_m0)s, %(Priority_m0)s, %(Resolution_m0)s, %(Assignee_m0)s, %(Reporter_m0)s, %(Creator_m0)s, %(Created_m0)s, %(Updated_m0)s, %(Last_Viewed_m0)s, %(Resolved_m0)s, %(Affects_Version/s_m0)s, %(Fix_Version/s_m0)s, %(Component/s_m0)s, %(Due_Date_m0)s, %(Labels_m0)s, %(Description_m0)s, %(Environment_m0)s, %(Watchers_m0)s, %(Log_Work_m0)s, %(Security_Level_m0)s, %(Attachment_m0)s, %(total_m0)s, %(Custom_field_AControl_NoZ_m0)s, %(Custom_field_ACustom_1Z_m0)s, %(Custom_field_ACustom_2Z_m0)s, %(Custom_field_ADate_of_first_ResponseZ_m0)s, %(Custom_field_AExperience_OwnerZ_m0)s, %(Custom_field_AFixed_in_releaseZ_m0)s, %(Custom_field_AFound_ByZ_m0)s, %(Custom_field_AFound_in_HW_versionZ_m0)s, %(Custom_field_AFound_in_SW_versionZ_m0)s, %(Custom_field_AKOCHI_Issue_TypeZ_m0)s, %(Custom_field_AKOCHI_Issue_Type_TransitionZ_m0)s, %(Custom_field_ALast_CommentZ_m0)s, %(Custom_field_AMatterZ_m0)s, %(Custom_field_AProject_NumberZ_m0)s, %(Custom_field_ARankZ_m0)s, %(Custom_field_ARealisation_plannedZ_m0)s, %(Custom_field_AReport_NumberZ_m0)s, %(Custom_field_AReport_TypeZ_m0)s, %(Custom_field_AReported_ByZ_m0)s, %(Custom_field_ARiskZ_m0)s, %(Custom_field_AStart_DateZ_m0)s, %(Custom_field_ATeamZ_m0)s, %(Comment_m0)s, %(Involvement_of_BSW_m0)s, %(Date_m0)s, %(ProjectNum_m0)s, %(BSW_Self_Test_m0)s, %(BSW_Issue_m0)s, %(Stack_BSW_Analyzed_m0)s, %(Stack_BSW_Unanalyzed_m0)s, %(Stack_Total_m0)s, %(BSW_Involve_m0)s, %(BSW_Involve_Unclosed_m0)s, %(HorizontalExpansion_Count_m0)s, %(HorizontalExpansion_PN_m0)s, %(HorizontalExpansion_Unfinished_m0)s, %(HorizontalExpansion_Delay_m0)s, %(BSW_Analysis_Conclusions_m0)s, %(Stack_Classification_m0)s, %(BSW_Reason_Classification_m0)s, %(BSW_Analyzed_m0)s, %(BSW_Unanalyzed_m0)s, %(BSW_Staff_List_m0)s, %(Found_By_Classification_m0)s, %(High_Priority_Unanalyzed_m0)s, %(Stack_Analyzed_m0)s, %(Stack_Unanalyzed_m0)s, %(update_over_15_m0)s, %(update_over_7_m0)s, %(Responsible_m0)s, %(Email_m0)s) AS new ON DUPLICATE KEY UPDATE `Summary` = new.`Summary`, `Issue id` = new.`Issue id`, `Parent id` = new.`Parent id`, `Issue Type` = new.`Issue Type`, `Status` = new.`Status`, `Project key` = new.`Project key`, `Project name` = new.`Project name`, `Project type` = new.`Project type`, `Project lead` = new.`Project lead`, `Project description` = new.`Project description`, `Project url` = new.`Project url`, `Priority` = new.`Priority`, `Resolution` = new.`Resolution`, `Assignee` = new.`Assignee`, `Reporter` = new.`Reporter`, `Creator` = new.`Creator`, `Created` = new.`Created`, `Updated` = new.`Updated`, `Last Viewed` = new.`Last Viewed`, `Resolved` = new.`Resolved`, `Affects Version/s` = new.`Affects Version/s`, `Fix Version/s` = new.`Fix Version/s`, `Component/s` = new.`Component/s`, `Due Date` = new.`Due Date`, `Labels` = new.`Labels`, `Description` = new.`Description`, `Environment` = new.`Environment`, `Watchers` = new.`Watchers`, `Log Work` = new.`Log Work`, `Security Level` = new.`Security Level`, `Attachment` = new.`Attachment`, total = new.total, `Custom field (Control No)` = new.`Custom field (Control No)`, `Custom field (Custom_1)` = new.`Custom field (Custom_1)`, `Custom field (Custom_2)` = new.`Custom field (Custom_2)`, `Custom field (Date of first Response)` = new.`Custom field (Date of first Response)`, `Custom field (Experience Owner)` = new.`Custom field (Experience Owner)`, `Custom field (Fixed in release)` = new.`Custom field (Fixed in release)`, `Custom field (Found By)` = new.`Custom field (Found By)`, `Custom field (Found in HW version)` = new.`Custom field (Found in HW version)`, `Custom field (Found in Mech Version)` = new.`Custom field (Found in Mech Version)`, `Custom field (Found in SVN version)` = new.`Custom field (Found in SVN version)`, `Custom field (Found in SW version)` = new.`Custom field (Found in SW version)`, `Custom field (KOCHI Issue Type)` = new.`Custom field (KOCHI Issue Type)`, `Custom field (KOCHI Issue Type Transition)` = new.`Custom field (KOCHI Issue Type Transition)`, `Custom field (Last Comment)` = new.`Custom field (Last Comment)`, `Custom field (Matter)` = new.`Custom field (Matter)`, `Custom field (Project Number)` = new.`Custom field (Project Number)`, `Custom field (Project Number P)` = new.`Custom field (Project Number P)`, `Custom field (Rank)` = new.`Custom field (Rank)`, `Custom field (Realisation planned)` = new.`Custom field (Realisation planned)`, `Custom field (Report Number)` = new.`Custom field (Report Number)`, `Custom field (Report Type)` = new.`Custom field (Report Type)`, `Custom field (Reported By)` = new.`Custom field (Reported By)`, `Custom field (Risk)` = new.`Custom field (Risk)`, `Custom field (Start Date)` = new.`Custom field (Start Date)`, `Custom field (Team)` = new.`Custom field (Team)`, `Comment` = new.`Comment`, `Involvement of BSW` = new.`Involvement of BSW`, `Date` = new.`Date`, `ProjectNum` = new.`ProjectNum`, `BSW Self Test` = new.`BSW Self Test`, `BSW Issue` = new.`BSW Issue`, `Stack BSW Analyzed` = new.`Stack BSW Analyzed`, `Stack BSW Unanalyzed` = new.`Stack BSW Unanalyzed`, `Stack Total` = new.`Stack Total`, `BSW Involve` = new.`BSW Involve`, `BSW Involve Unclosed` = new.`BSW Involve Unclosed`, `HorizontalExpansion Count` = new.`HorizontalExpansion Count`, `HorizontalExpansion PN` = new.`HorizontalExpansion PN`, `HorizontalExpansion Unfinished` = new.`HorizontalExpansion Unfinished`, `HorizontalExpansion Delay` = new.`HorizontalExpansion Delay`, `BSW Analysis Conclusions` = new.`BSW Analysis Conclusions`, `Stack Classification` = new.`Stack Classification`, `BSW Reason Classification` = new.`BSW Reason Classification`, `BSW Analyzed` = new.`BSW Analyzed`, `BSW Unanalyzed` = new.`BSW Unanalyzed`, `BSW Staff List` = new.`BSW Staff List`, `Found By Classification` = new.`Found By Classification`, `High Priority Unanalyzed` = new.`High Priority Unanalyzed`, `Stack_Analyzed` = new.`Stack_Analyzed`, `Stack_Unanalyzed` = new.`Stack_Unanalyzed`, update_over_15 = new.update_over_15, update_over_7 = new.update_over_7, `Responsible` = new.`Responsible`, `Email` = new.`Email`] [parameters: {'Summary_m0': 'KOCHI_LL-696: Avoid component missing during BRD import by step format ', 'Issue_key_m0': 'P09192-2', 'Issue_id_m0': '1315368', 'Parent_id_m0': '1302030.0', 'Issue_Type_m0': 'Sub-ToDo', 'Status_m0': 'Closed', 'Project_key_m0': 'P09192', 'Project_name_m0': 'P09192 GWM_BLE_BNWC_P14', 'Project_type_m0': 'software', 'Project_lead_m0': 'wang161', 'Project_description_m0': '', 'Project_url_m0': '', 'Priority_m0': 'Medium', 'Resolution_m0': 'Done', 'Assignee_m0': 'liu033', 'Reporter_m0': 'yu017', 'Creator_m0': 'yu017', 'Created_m0': Timestamp('2025-06-12 08:11:00'), 'Updated_m0': Timestamp('2025-09-09 11:55:00'), 'Last_Viewed_m0': Timestamp('2025-11-24 19:24:00'), 'Resolved_m0': Timestamp('2025-09-09 11:55:00'), 'Affects_Version/s_m0': '', 'Fix_Version/s_m0': '', 'Component/s_m0': '', 'Due_Date_m0': Timestamp('2025-07-10 00:00:00'), 'Labels_m0': '', 'Description_m0': 'Please check the relevance of KOCHI_LL-696 in the project\n\n*Evidence:*\r\nConsider this experience before important sampling delivery or design change.', 'Environment_m0': '', 'Watchers_m0': '', 'Log_Work_m0': '', 'Security_Level_m0': '', 'Attachment_m0': '', 'total_m0': 0, 'Custom_field_AControl_NoZ_m0': '', 'Custom_field_ACustom_1Z_m0': '', 'Custom_field_ACustom_2Z_m0': '', 'Custom_field_ADate_of_first_ResponseZ_m0': None, 'Custom_field_AExperience_OwnerZ_m0': '', 'Custom_field_AFixed_in_releaseZ_m0': '', 'Custom_field_AFound_ByZ_m0': '', 'Custom_field_AFound_in_HW_versionZ_m0': '', 'Custom_field_AFound_in_SW_versionZ_m0': '', 'Custom_field_AKOCHI_Issue_TypeZ_m0': '', 'Custom_field_AKOCHI_Issue_Type_TransitionZ_m0': '', 'Custom_field_ALast_CommentZ_m0': '', 'Custom_field_AMatterZ_m0': 'Hardware', 'Custom_field_AProject_NumberZ_m0': '', 'Custom_field_ARankZ_m0': '1|i47fo8:', 'Custom_field_ARealisation_plannedZ_m0': '', 'Custom_field_AReport_NumberZ_m0': '', 'Custom_field_AReport_TypeZ_m0': '', 'Custom_field_AReported_ByZ_m0': '', 'Custom_field_ARiskZ_m0': '', 'Custom_field_AStart_DateZ_m0': '', 'Custom_field_ATeamZ_m0': '', 'Comment_m0': '', 'Involvement_of_BSW_m0': 'No', 'Date_m0': Timestamp('2025-11-25 02:24:10'), 'ProjectNum_m0': 'P09192', 'BSW_Self_Test_m0': 0, 'BSW_Issue_m0': 0, 'Stack_BSW_Analyzed_m0': 0, 'Stack_BSW_Unanalyzed_m0': 0, 'Stack_Total_m0': 0, 'BSW_Involve_m0': 0, 'BSW_Involve_Unclosed_m0': 0, 'HorizontalExpansion_Count_m0': 0, 'HorizontalExpansion_PN_m0': None, 'HorizontalExpansion_Unfinished_m0': 0, 'HorizontalExpansion_Delay_m0': 0, 'BSW_Analysis_Conclusions_m0': 'Non-BSW', 'Stack_Classification_m0': 'Unclassed', 'BSW_Reason_Classification_m0': '底层未参与分析', 'BSW_Analyzed_m0': 0, 'BSW_Unanalyzed_m0': 0, 'BSW_Staff_List_m0': 'No', 'Found_By_Classification_m0': 'Others', 'High_Priority_Unanalyzed_m0': 0, 'Stack_Analyzed_m0': 0, 'Stack_Unanalyzed_m0': 0, 'update_over_15_m0': 0, 'update_over_7_m0': 0, 'Responsible_m0': 'Bob', 'Email_m0': 'bob@example.com'}] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-11-25 17:25:01,807 - ERROR - 行级操作失败: P09192-1, (pymysql.err.OperationalError) (1054, "Unknown column 'new.Custom field (Found in Mech Version)' in 'field list'") [SQL: INSERT INTO jira_task_bsw_deal (`Summary`, `Issue key`, `Issue id`, `Parent id`, `Issue Type`, `Status`, `Project key`, `Project name`, `Project type`, `Project lead`, `Project description`, `Project url`, `Priority`, `Resolution`, `Assignee`, `Reporter`, `Creator`, `Created`, `Updated`, `Last Viewed`, `Resolved`, `Affects Version/s`, `Fix Version/s`, `Component/s`, `Due Date`, `Labels`, `Description`, `Environment`, `Watchers`, `Log Work`, `Security Level`, `Attachment`, total, `Custom field (Control No)`, `Custom field (Custom_1)`, `Custom field (Custom_2)`, `Custom field (Date of first Response)`, `Custom field (Experience Owner)`, `Custom field (Fixed in release)`, `Custom field (Found By)`, `Custom field (Found in HW version)`, `Custom field (Found in SW version)`, `Custom field (KOCHI Issue Type)`, `Custom field (KOCHI Issue Type Transition)`, `Custom field (Last Comment)`, `Custom field (Matter)`, `Custom field (Project Number)`, `Custom field (Rank)`, `Custom field (Realisation planned)`, `Custom field (Report Number)`, `Custom field (Report Type)`, `Custom field (Reported By)`, `Custom field (Risk)`, `Custom field (Start Date)`, `Custom field (Team)`, `Comment`, `Involvement of BSW`, `Date`, `ProjectNum`, `BSW Self Test`, `BSW Issue`, `Stack BSW Analyzed`, `Stack BSW Unanalyzed`, `Stack Total`, `BSW Involve`, `BSW Involve Unclosed`, `HorizontalExpansion Count`, `HorizontalExpansion PN`, `HorizontalExpansion Unfinished`, `HorizontalExpansion Delay`, `BSW Analysis Conclusions`, `Stack Classification`, `BSW Reason Classification`, `BSW Analyzed`, `BSW Unanalyzed`, `BSW Staff List`, `Found By Classification`, `High Priority Unanalyzed`, `Stack_Analyzed`, `Stack_Unanalyzed`, update_over_15, update_over_7, `Responsible`, `Email`) VALUES (%(Summary_m0)s, %(Issue_key_m0)s, %(Issue_id_m0)s, %(Parent_id_m0)s, %(Issue_Type_m0)s, %(Status_m0)s, %(Project_key_m0)s, %(Project_name_m0)s, %(Project_type_m0)s, %(Project_lead_m0)s, %(Project_description_m0)s, %(Project_url_m0)s, %(Priority_m0)s, %(Resolution_m0)s, %(Assignee_m0)s, %(Reporter_m0)s, %(Creator_m0)s, %(Created_m0)s, %(Updated_m0)s, %(Last_Viewed_m0)s, %(Resolved_m0)s, %(Affects_Version/s_m0)s, %(Fix_Version/s_m0)s, %(Component/s_m0)s, %(Due_Date_m0)s, %(Labels_m0)s, %(Description_m0)s, %(Environment_m0)s, %(Watchers_m0)s, %(Log_Work_m0)s, %(Security_Level_m0)s, %(Attachment_m0)s, %(total_m0)s, %(Custom_field_AControl_NoZ_m0)s, %(Custom_field_ACustom_1Z_m0)s, %(Custom_field_ACustom_2Z_m0)s, %(Custom_field_ADate_of_first_ResponseZ_m0)s, %(Custom_field_AExperience_OwnerZ_m0)s, %(Custom_field_AFixed_in_releaseZ_m0)s, %(Custom_field_AFound_ByZ_m0)s, %(Custom_field_AFound_in_HW_versionZ_m0)s, %(Custom_field_AFound_in_SW_versionZ_m0)s, %(Custom_field_AKOCHI_Issue_TypeZ_m0)s, %(Custom_field_AKOCHI_Issue_Type_TransitionZ_m0)s, %(Custom_field_ALast_CommentZ_m0)s, %(Custom_field_AMatterZ_m0)s, %(Custom_field_AProject_NumberZ_m0)s, %(Custom_field_ARankZ_m0)s, %(Custom_field_ARealisation_plannedZ_m0)s, %(Custom_field_AReport_NumberZ_m0)s, %(Custom_field_AReport_TypeZ_m0)s, %(Custom_field_AReported_ByZ_m0)s, %(Custom_field_ARiskZ_m0)s, %(Custom_field_AStart_DateZ_m0)s, %(Custom_field_ATeamZ_m0)s, %(Comment_m0)s, %(Involvement_of_BSW_m0)s, %(Date_m0)s, %(ProjectNum_m0)s, %(BSW_Self_Test_m0)s, %(BSW_Issue_m0)s, %(Stack_BSW_Analyzed_m0)s, %(Stack_BSW_Unanalyzed_m0)s, %(Stack_Total_m0)s, %(BSW_Involve_m0)s, %(BSW_Involve_Unclosed_m0)s, %(HorizontalExpansion_Count_m0)s, %(HorizontalExpansion_PN_m0)s, %(HorizontalExpansion_Unfinished_m0)s, %(HorizontalExpansion_Delay_m0)s, %(BSW_Analysis_Conclusions_m0)s, %(Stack_Classification_m0)s, %(BSW_Reason_Classification_m0)s, %(BSW_Analyzed_m0)s, %(BSW_Unanalyzed_m0)s, %(BSW_Staff_List_m0)s, %(Found_By_Classification_m0)s, %(High_Priority_Unanalyzed_m0)s, %(Stack_Analyzed_m0)s, %(Stack_Unanalyzed_m0)s, %(update_over_15_m0)s, %(update_over_7_m0)s, %(Responsible_m0)s, %(Email_m0)s) AS new ON DUPLICATE KEY UPDATE `Summary` = new.`Summary`, `Issue id` = new.`Issue id`, `Parent id` = new.`Parent id`, `Issue Type` = new.`Issue Type`, `Status` = new.`Status`, `Project key` = new.`Project key`, `Project name` = new.`Project name`, `Project type` = new.`Project type`, `Project lead` = new.`Project lead`, `Project description` = new.`Project description`, `Project url` = new.`Project url`, `Priority` = new.`Priority`, `Resolution` = new.`Resolution`, `Assignee` = new.`Assignee`, `Reporter` = new.`Reporter`, `Creator` = new.`Creator`, `Created` = new.`Created`, `Updated` = new.`Updated`, `Last Viewed` = new.`Last Viewed`, `Resolved` = new.`Resolved`, `Affects Version/s` = new.`Affects Version/s`, `Fix Version/s` = new.`Fix Version/s`, `Component/s` = new.`Component/s`, `Due Date` = new.`Due Date`, `Labels` = new.`Labels`, `Description` = new.`Description`, `Environment` = new.`Environment`, `Watchers` = new.`Watchers`, `Log Work` = new.`Log Work`, `Security Level` = new.`Security Level`, `Attachment` = new.`Attachment`, total = new.total, `Custom field (Control No)` = new.`Custom field (Control No)`, `Custom field (Custom_1)` = new.`Custom field (Custom_1)`, `Custom field (Custom_2)` = new.`Custom field (Custom_2)`, `Custom field (Date of first Response)` = new.`Custom field (Date of first Response)`, `Custom field (Experience Owner)` = new.`Custom field (Experience Owner)`, `Custom field (Fixed in release)` = new.`Custom field (Fixed in release)`, `Custom field (Found By)` = new.`Custom field (Found By)`, `Custom field (Found in HW version)` = new.`Custom field (Found in HW version)`, `Custom field (Found in Mech Version)` = new.`Custom field (Found in Mech Version)`, `Custom field (Found in SVN version)` = new.`Custom field (Found in SVN version)`, `Custom field (Found in SW version)` = new.`Custom field (Found in SW version)`, `Custom field (KOCHI Issue Type)` = new.`Custom field (KOCHI Issue Type)`, `Custom field (KOCHI Issue Type Transition)` = new.`Custom field (KOCHI Issue Type Transition)`, `Custom field (Last Comment)` = new.`Custom field (Last Comment)`, `Custom field (Matter)` = new.`Custom field (Matter)`, `Custom field (Project Number)` = new.`Custom field (Project Number)`, `Custom field (Project Number P)` = new.`Custom field (Project Number P)`, `Custom field (Rank)` = new.`Custom field (Rank)`, `Custom field (Realisation planned)` = new.`Custom field (Realisation planned)`, `Custom field (Report Number)` = new.`Custom field (Report Number)`, `Custom field (Report Type)` = new.`Custom field (Report Type)`, `Custom field (Reported By)` = new.`Custom field (Reported By)`, `Custom field (Risk)` = new.`Custom field (Risk)`, `Custom field (Start Date)` = new.`Custom field (Start Date)`, `Custom field (Team)` = new.`Custom field (Team)`, `Comment` = new.`Comment`, `Involvement of BSW` = new.`Involvement of BSW`, `Date` = new.`Date`, `ProjectNum` = new.`ProjectNum`, `BSW Self Test` = new.`BSW Self Test`, `BSW Issue` = new.`BSW Issue`, `Stack BSW Analyzed` = new.`Stack BSW Analyzed`, `Stack BSW Unanalyzed` = new.`Stack BSW Unanalyzed`, `Stack Total` = new.`Stack Total`, `BSW Involve` = new.`BSW Involve`, `BSW Involve Unclosed` = new.`BSW Involve Unclosed`, `HorizontalExpansion Count` = new.`HorizontalExpansion Count`, `HorizontalExpansion PN` = new.`HorizontalExpansion PN`, `HorizontalExpansion Unfinished` = new.`HorizontalExpansion Unfinished`, `HorizontalExpansion Delay` = new.`HorizontalExpansion Delay`, `BSW Analysis Conclusions` = new.`BSW Analysis Conclusions`, `Stack Classification` = new.`Stack Classification`, `BSW Reason Classification` = new.`BSW Reason Classification`, `BSW Analyzed` = new.`BSW Analyzed`, `BSW Unanalyzed` = new.`BSW Unanalyzed`, `BSW Staff List` = new.`BSW Staff List`, `Found By Classification` = new.`Found By Classification`, `High Priority Unanalyzed` = new.`High Priority Unanalyzed`, `Stack_Analyzed` = new.`Stack_Analyzed`, `Stack_Unanalyzed` = new.`Stack_Unanalyzed`, update_over_15 = new.update_over_15, update_over_7 = new.update_over_7, `Responsible` = new.`Responsible`, `Email` = new.`Email`] [parameters: {'Summary_m0': 'GW3 LL Workshop', 'Issue_key_m0': 'P09192-1', 'Issue_id_m0': '1302030', 'Parent_id_m0': '', 'Issue_Type_m0': 'ToDo', 'Status_m0': 'To Do', 'Project_key_m0': 'P09192', 'Project_name_m0': 'P09192 GWM_BLE_BNWC_P14', 'Project_type_m0': 'software', 'Project_lead_m0': 'wang161', 'Project_description_m0': '', 'Project_url_m0': '', 'Priority_m0': 'Medium', 'Resolution_m0': '', 'Assignee_m0': 'pan009', 'Reporter_m0': 'yu017', 'Creator_m0': 'yu017', 'Created_m0': Timestamp('2025-05-26 07:18:00'), 'Updated_m0': Timestamp('2025-06-16 07:08:00'), 'Last_Viewed_m0': Timestamp('2025-11-24 19:24:00'), 'Resolved_m0': NaT, 'Affects_Version/s_m0': '', 'Fix_Version/s_m0': '', 'Component/s_m0': '', 'Due_Date_m0': Timestamp('2026-05-23 00:00:00'), 'Labels_m0': 'LL-Workshop', 'Description_m0': 'AEQ: Pan Lili\r\nThis ticket serves as main ticket for the initial lessons learned Workshop at GW3.\r\nDate: 20250616\r\nInvited:See attachment\r\nBe ... (406 characters truncated) ... implementation has to be checked by AEQ. If the implementation cannot be verified, the sub-task is reopened and assigned back to the originator.\r\n', 'Environment_m0': '', 'Watchers_m0': '', 'Log_Work_m0': '', 'Security_Level_m0': '', 'Attachment_m0': '11.06.2025 03:06;yu017;P09192-GWM-C06 BLE.xlsx;https://jira.kostal.com/secure/attachment/1234604/P09192-GWM-C06+BLE.xlsx||16.06.2025 07:08;yu017;答复 ... (32 characters truncated) ... s://jira.kostal.com/secure/attachment/1237494/%E7%AD%94%E5%A4%8D++P09192%E9%A1%B9%E7%9B%AE%E7%9A%84LL+kickoff%E5%AF%BC%E5%85%A5%E4%BC%9A%E8%AE%AE.msg', 'total_m0': 0, 'Custom_field_AControl_NoZ_m0': '', 'Custom_field_ACustom_1Z_m0': '', 'Custom_field_ACustom_2Z_m0': '', 'Custom_field_ADate_of_first_ResponseZ_m0': None, 'Custom_field_AExperience_OwnerZ_m0': '', 'Custom_field_AFixed_in_releaseZ_m0': '', 'Custom_field_AFound_ByZ_m0': '', 'Custom_field_AFound_in_HW_versionZ_m0': '', 'Custom_field_AFound_in_SW_versionZ_m0': '', 'Custom_field_AKOCHI_Issue_TypeZ_m0': '', 'Custom_field_AKOCHI_Issue_Type_TransitionZ_m0': '', 'Custom_field_ALast_CommentZ_m0': '', 'Custom_field_AMatterZ_m0': '', 'Custom_field_AProject_NumberZ_m0': '', 'Custom_field_ARankZ_m0': '1|i45am8:', 'Custom_field_ARealisation_plannedZ_m0': '', 'Custom_field_AReport_NumberZ_m0': '', 'Custom_field_AReport_TypeZ_m0': '', 'Custom_field_AReported_ByZ_m0': '', 'Custom_field_ARiskZ_m0': '', 'Custom_field_AStart_DateZ_m0': '', 'Custom_field_ATeamZ_m0': '', 'Comment_m0': '', 'Involvement_of_BSW_m0': 'No', 'Date_m0': Timestamp('2025-11-25 02:24:10'), 'ProjectNum_m0': 'P09192', 'BSW_Self_Test_m0': 0, 'BSW_Issue_m0': 0, 'Stack_BSW_Analyzed_m0': 0, 'Stack_BSW_Unanalyzed_m0': 0, 'Stack_Total_m0': 0, 'BSW_Involve_m0': 0, 'BSW_Involve_Unclosed_m0': 0, 'HorizontalExpansion_Count_m0': 0, 'HorizontalExpansion_PN_m0': None, 'HorizontalExpansion_Unfinished_m0': 0, 'HorizontalExpansion_Delay_m0': 0, 'BSW_Analysis_Conclusions_m0': 'Non-BSW', 'Stack_Classification_m0': 'Unclassed', 'BSW_Reason_Classification_m0': '底层未参与分析', 'BSW_Analyzed_m0': 0, 'BSW_Unanalyzed_m0': 0, 'BSW_Staff_List_m0': 'No', 'Found_By_Classification_m0': 'Others', 'High_Priority_Unanalyzed_m0': 0, 'Stack_Analyzed_m0': 0, 'Stack_Unanalyzed_m0': 0, 'update_over_15_m0': 0, 'update_over_7_m0': 0, 'Responsible_m0': 'Bob', 'Email_m0': 'bob@example.com'}] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-11-25 17:25:01,810 - INFO - 成功写入/更新 0 条记录 2025-11-25 17:25:01,810 - INFO - 成功写入 3894 条记录到 jira_task_bsw_deal 2025-11-25 17:25:01,810 - INFO - 数据处理完成,共写入 3894 条记录
11-26
"C:\Program Files\Python39\python.exe" "D:\AEB Management\9.py\MySQL_JIRA_Normative_Health\main.py" 2025-12-06 13:18:10,508 - INFO - 目标表列名: ['summary', 'issue key', 'issue id', 'parent id', 'issue type', 'status', 'project key', 'project name', 'project type', 'project lead', 'project description', 'project url', 'priority', 'resolution', 'assignee', 'reporter', 'creator', 'created', 'updated', 'last viewed', 'resolved', 'affects version/s', 'fix version/s', 'component/s', 'due date', 'labels', 'description', 'environment', 'watchers', 'log work', 'security level', 'total', 'custom field (control no)', 'custom field (custom_1)', 'custom field (custom_2)', 'custom field (date of first response)', 'custom field (experience owner)', 'custom field (fixed in release)', 'custom field (found by)', 'custom field (found in hw version)', 'custom field (found in mech version)', 'custom field (found in svn version)', 'custom field (found in sw version)', 'custom field (kochi issue type)', 'custom field (kochi issue type transition)', 'custom field (last comment)', 'custom field (matter)', 'custom field (project number)', 'custom field (project number p)', 'custom field (rank)', 'custom field (realisation planned)', 'custom field (report number)', 'custom field (report type)', 'custom field (reported by)', 'custom field (risk)', 'custom field (start date)', 'custom field (team)', 'comment', 'involvement of bsw', 'date', 'projectnum', 'bsw self test', 'bsw issue', 'stack bsw analyzed', 'stack bsw unanalyzed', 'stack total', 'bsw involve', 'bsw involve unclosed', 'horizontalexpansion count', 'horizontalexpansion pn', 'horizontalexpansion unfinished', 'horizontalexpansion delay', 'bsw analysis conclusions', 'stack classification', 'bsw reason classification', 'bsw staff list', 'found by classification', 'high priority unanalyzed', 'update_over_15', 'update_over_7', 'responsible', 'email', 'bsw analyzed', 'bsw unanalyzed', 'bsw deal time', 'bsw team', 'jira link', 'stack classification completion', 'weekly', 'py time'] 2025-12-06 13:18:10,508 - INFO - 开始计算项目聚合值... 2025-12-06 13:18:10,530 - ERROR - 数据库连接失败: (pymysql.err.OperationalError) (1054, "Unknown column 'BSW Involved' in 'field list'") [SQL: SELECT `Project key`, SUM(COALESCE(`BSW Involved`, 0)) AS total_bsw_involved, SUM(COALESCE(`Stack BSW Analyzed`, 0)) AS total_bsw_analyzed, SUM(COALESCE(`Stack BSW Unanalyzed`, 0)) AS total_bsw_unanalyzed FROM jira_task_bsw_deal GROUP BY `Project key` ] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-12-06 13:18:10,532 - ERROR - 数据库连接失败: (pymysql.err.OperationalError) (1054, "Unknown column 'BSW Involved' in 'field list'") [SQL: SELECT `Project key`, SUM(COALESCE(`BSW Involved`, 0)) AS total_bsw_involved, SUM(COALESCE(`Stack BSW Analyzed`, 0)) AS total_bsw_analyzed, SUM(COALESCE(`Stack BSW Unanalyzed`, 0)) AS total_bsw_unanalyzed FROM jira_task_bsw_deal GROUP BY `Project key` ] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-12-06 13:18:10,534 - ERROR - ETL流程执行失败 Traceback (most recent call last): File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\default.py", line 951, in do_execute cursor.execute(statement, parameters) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\cursors.py", line 153, in execute result = self._query(query) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\cursors.py", line 322, in _query conn.query(q) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 575, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 826, in _read_query_result result.read() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 1203, in read first_packet = self.connection._read_packet() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 782, in _read_packet packet.raise_for_error() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\err.py", line 150, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1054, "Unknown column 'BSW Involved' in 'field list'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\AEB Management\9.py\MySQL_JIRA_Normative_Health\main.py", line 167, in main process_data( File "D:\AEB Management\9.py\MySQL_JIRA_Normative_Health\main.py", line 92, in process_data df_agg = pd.read_sql_query(agg_query, con=source_conn) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pandas\io\sql.py", line 528, in read_sql_query return pandas_sql.read_query( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pandas\io\sql.py", line 1848, in read_query result = self.execute(sql, params) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pandas\io\sql.py", line 1671, in execute return self.con.exec_driver_sql(sql, *args) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 1779, in exec_driver_sql ret = self._execute_context( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context return self._exec_single_context( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context self._handle_dbapi_exception( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 2355, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\engine\default.py", line 951, in do_execute cursor.execute(statement, parameters) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\cursors.py", line 153, in execute result = self._query(query) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\cursors.py", line 322, in _query conn.query(q) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 575, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 826, in _read_query_result result.read() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 1203, in read first_packet = self.connection._read_packet() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\connections.py", line 782, in _read_packet packet.raise_for_error() File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) File "C:\Users\dong004\AppData\Roaming\Python\Python39\site-packages\pymysql\err.py", line 150, in raise_mysql_exception raise errorclass(errno, errval) sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1054, "Unknown column 'BSW Involved' in 'field list'") [SQL: SELECT `Project key`, SUM(COALESCE(`BSW Involved`, 0)) AS total_bsw_involved, SUM(COALESCE(`Stack BSW Analyzed`, 0)) AS total_bsw_analyzed, SUM(COALESCE(`Stack BSW Unanalyzed`, 0)) AS total_bsw_unanalyzed FROM jira_task_bsw_deal GROUP BY `Project key` ] (Background on this error at: https://sqlalche.me/e/20/e3q8) 进程已结束,退出代码为 0
最新发布
12-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值