读取DM数据库

This commit is contained in:
2026-02-27 17:06:56 +08:00
parent 0c0a295f09
commit df46812eff
12 changed files with 485 additions and 30 deletions

16
config/config.json Normal file
View File

@@ -0,0 +1,16 @@
{
"source": "json",
"json": {
"input_file": "data/raw_data_sample.json",
"output_file": "data/cleaned_data_final.json",
"report_file": "report/detailed_cleaning_report.json"
},
"db": {
"host": "127.0.0.1",
"port": 5080,
"user": "SYSDBA",
"schema": "SYSDBA",
"table": "OBJECTIVE_INSTANCE",
"query": null
}
}

21
config/config.yaml Normal file
View File

@@ -0,0 +1,21 @@
# 数据清洗系统配置文件
# 通过 source 切换json开发 / db生产-达梦)
source: json # 开发用 json部署达梦时改为 db或直接改 config.json
# JSON 文件模式source=json 时生效)
json:
input_file: data/raw_data_sample.json
output_file: data/cleaned_data_final.json
report_file: report/detailed_cleaning_report.json
# 达梦数据库模式source=db 时生效)
# 密码通过环境变量 DM_PASSWORD 传入,切勿写入配置文件
db:
host: 127.0.0.1
port: 5080
user: SYSDBA
schema: SYSDBA
# OBJECTIVE_INSTANCE 表结构与 raw_data_sample.json 一致,直接查询即可
table: OBJECTIVE_INSTANCE
query: null