Update deprecated mongoimport code

Signed-off-by: coleramos425 <colramos@amd.com>

[ROCm/rocprofiler-compute commit: 227760ce1c]
이 커밋은 다음에 포함됨:
Cole Ramos 작성하고 GitHub가 2023-01-23 13:53:39 -06:00를 커밋함
1 부모 2b50098210
커밋 d61ef67591
1 파일이 변경됨
+5 -4
+5 -4
파일 보기
@@ -224,27 +224,28 @@ def convert_folder(connectionInfo, Extractionlvl):
df_saved_file = t2.to_csv(newfilepath + file)
cmd = (
'mongoimport --quiet --uri mongodb://{}:{}@{}:{} --authenticationDatabase "admin" --file {} -d {} -c {} --drop --type csv --headerline'
'mongoimport --quiet --uri mongodb://{}:{}@{}:{}/{}?authSource=admin --file {} -c {} --drop --type csv --headerline'
).format(
connectionInfo["username"],
connectionInfo["password"],
connectionInfo["host"],
connectionInfo["port"],
newfilepath + file,
connectionInfo["db"],
newfilepath + file,
fileName,
)
os.system(cmd)
else:
cmd = (
'mongoimport --quiet --uri mongodb://{}:{}@{}:{} --authenticationDatabase "admin" --file {} -d {} -c {} --drop --type csv --headerline'
'mongoimport --quiet --uri mongodb://{}:{}@{}:{}/{}?authSource=admin --file {} -c {} --drop --type csv --headerline'
).format(
connectionInfo["username"],
connectionInfo["password"],
connectionInfo["host"],
connectionInfo["port"],
connectionInfo["workload"] + "/" + file,
connectionInfo["db"],
connectionInfo["workload"] + "/" + file,
fileName,
)
os.system(cmd)