Skip to content

Commit

Permalink
fix(hive): Workaround for Python 3.9 s3 transfer issue (#19887)
Browse files Browse the repository at this point in the history
* fix(hive): Workaround for Python 3.9 s3 transfer issue

* Update hive.py
  • Loading branch information
john-bodley authored May 4, 2022
1 parent 4fdf230 commit fdf48c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset/db_engine_specs/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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), # Threading is broken in Python 3.9.
)
return location

Expand Down

0 comments on commit fdf48c6

Please sign in to comment.