Browse Source

表名全小写修改

liweiquan 2 years ago
parent
commit
51a93345e5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/routers/data_management.py

+ 2 - 1
app/routers/data_management.py

@@ -32,7 +32,8 @@ router = APIRouter(
 @sxtimeit
 def create_data_management(item: schemas.DataManagementCreate, db: Session = Depends(get_db)):
     current_time = int(time.time())
-    table_name = f'project{g.project_id.lower()}_user{item.user_id.lower()}_{item.name.lower()}_{current_time}'
+    table_name = f'project{g.project_id}_user{item.user_id}_{item.name}_{current_time}'
+    table_name = table_name.lower()
     tmp_table_name = get_tmp_table_name(item.dag_uuid, item.node_id, str(item.out_pin), db)
     af_run_res = data_transfer_run(database_name+'.'+tmp_table_name, database_name+'.'+table_name)
     af_run = af_run_res['data'] if 'data' in af_run_res.keys() else None