diff --git a/scripts/deploy-dbf-import.sh b/scripts/deploy-dbf-import.sh index 59da2f0..93b2931 100644 --- a/scripts/deploy-dbf-import.sh +++ b/scripts/deploy-dbf-import.sh @@ -9,11 +9,11 @@ BATCH_SIZE=${BATCH_SIZE:-"1000"} LOG_LEVEL=${LOG_LEVEL:-"INFO"} DATA_PVC_NAME=${DATA_PVC_NAME:-"data-import-export-pvc"} # todo: 下面参数使用时需要修改 -DB_HOST=${DB_HOST:-"xx-postgres-service"} -DB_PORT=${DB_PORT:-"5432"} -DB_NAME=${DB_NAME:-"xx"} -DB_USER=${DB_USER:-"xx_db_user"} -DB_PASSWORD=${DB_PASSWORD:-"xx_db_password"} +DB_HOST=${DB_HOST:-"test-db.db.svc.cluster.local"} +DB_PORT=${DB_PORT:-"6432"} +DB_NAME=${DB_NAME:-"idrc"} +DB_USER=${DB_USER:-"idrc"} +DB_PASSWORD=${DB_PASSWORD:-"a8aa283c1b3ca0bdfe1d2669dd400f3d"} # 导出变量用于envsubst diff --git a/src/pipelines/dbf_to_postgres.py b/src/pipelines/dbf_to_postgres.py index 0c00152..8a2febf 100644 --- a/src/pipelines/dbf_to_postgres.py +++ b/src/pipelines/dbf_to_postgres.py @@ -154,7 +154,7 @@ class DbfToPostgresPipeline(BasePipeline): if len(batch_data) >= batch_size: # todo:本地调试先注释掉 self.db.execute_batch( - "INSERT INTO target_table (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)", + "INSERT INTO current_states (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)", batch_data ) # todo:本地调试先注释掉 @@ -170,7 +170,7 @@ class DbfToPostgresPipeline(BasePipeline): if batch_data: # todo:本地调试先注释掉 self.db.execute_batch( - "INSERT INTO target_table (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)", + "INSERT INTO current_states (t, device_instance_capability_id, point_id, value) VALUES (%s, %s, %s, %s)", batch_data ) # todo:本地调试先注释掉