feat:複数クエリに対応するため、DB接続オプションを追加した
This commit is contained in:
parent
9ba49d2d89
commit
4660a56d31
@ -1,6 +1,7 @@
|
||||
from datetime import datetime
|
||||
import boto3
|
||||
import pymysql
|
||||
from pymysql.constants import CLIENT
|
||||
import io
|
||||
import csv
|
||||
from error import error
|
||||
@ -52,7 +53,7 @@ def main(bucket_name, target_key, target_data_source, target_file_name, settings
|
||||
|
||||
try:
|
||||
# ② DB接続を開始する
|
||||
conn = pymysql.connect(host=db_info["host"], user=db_info["user"], passwd=db_info["pass"], db=db_info["name"], connect_timeout=5)
|
||||
conn = pymysql.connect(host=db_info["host"], user=db_info["user"], passwd=db_info["pass"], db=db_info["name"], connect_timeout=5, client_flag=CLIENT.MULTI_STATEMENTS)
|
||||
print(f'{str(datetime.now())} {log_info} {LOG_LEVEL["i"]} I-MAIN-02 - DB接続を開始しました')
|
||||
|
||||
# ③ タイムゾーンを変更する
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user