|
@@ -35,11 +35,9 @@ def get_partition_df(table, dt):
|
|
|
try:
|
|
|
download_session = odps_client.get_download_session(table, dt)
|
|
|
logger.info(f"表: {table} 中的分区 {dt}, 共有 {download_session.count} 条数据")
|
|
|
- with download_session.open_record_reader(0, download_session.count) as reader:
|
|
|
- records = []
|
|
|
- for record in reader:
|
|
|
- records.append(record.values) # 获取每一行的值
|
|
|
- df = pd.DataFrame(records, columns=[col.name for col in reader.schema.columns]) # 转换为 DataFrame
|
|
|
+ with download_session.open_arrow_reader(0, download_session.count) as reader:
|
|
|
+ # 将所有数据加载到 DataFrame 中
|
|
|
+ df = pd.concat([batch.to_pandas() for batch in reader])
|
|
|
except Exception as e:
|
|
|
logger.error(f"下载 {table} -- {dt} 的数据异常: ", e)
|
|
|
|
|
@@ -387,7 +385,7 @@ if __name__ == '__main__':
|
|
|
card_json['i18n_header']['zh_cn']["title"]['content'] = "XGB模型训练预测失败"
|
|
|
card_json['i18n_elements']['zh_cn'][0]['content'] = msg_text
|
|
|
# 发送通知
|
|
|
- feishu_inform_util.send_card_msg_to_feishu(
|
|
|
- webhook=config_manager.get_vov_model_inform_feishu_webhook(),
|
|
|
- card_json=card_json
|
|
|
- )
|
|
|
+ # feishu_inform_util.send_card_msg_to_feishu(
|
|
|
+ # webhook=config_manager.get_vov_model_inform_feishu_webhook(),
|
|
|
+ # card_json=card_json
|
|
|
+ # )
|