You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2022/04/28 20:22:20 UTC
[superset] 01/01: fix(hive): Workaround for Python 3.9 s3 transfer issue
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch john-bodley--hive-upload_to_s3
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 56742ed8a7e53d23743b95e761ea998dded58ca6
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Fri Apr 29 08:22:11 2022 +1200
fix(hive): Workaround for Python 3.9 s3 transfer issue
---
superset/db_engine_specs/hive.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/superset/db_engine_specs/hive.py b/superset/db_engine_specs/hive.py
index 484e867ab0..05a20af9ce 100644
--- a/superset/db_engine_specs/hive.py
+++ b/superset/db_engine_specs/hive.py
@@ -65,6 +65,7 @@ def upload_to_s3(filename: str, upload_prefix: str, table: Table) -> str:
# pylint: disable=import-outside-toplevel
import boto3
+ from boto3.s3.transfer import TransferConfig
bucket_path = current_app.config["CSV_TO_HIVE_UPLOAD_S3_BUCKET"]
@@ -80,6 +81,7 @@ def upload_to_s3(filename: str, upload_prefix: str, table: Table) -> str:
filename,
bucket_path,
os.path.join(upload_prefix, table.table, os.path.basename(filename)),
+ Config=TransferConfig(use_threads=False),
)
return location