"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
最新发布