我正在尝试将 df 写入 Athena,但创建的表始终为空。我使用 python 3.8 和 windows 11 系统。我使用 pyathena 向 Athena 写入数据帧,但直到现在还没有出现问题。
from pyathena import connect
from pyathena.pandas.util import to_sql
conn = connect(aws_access_key_id="KEY",
aws_secret_access_key="SKEY",
s3_staging_dir="STAGINGDIR", # query location dir
region_name="eu-central-1")
to_sql(df,
"TABLENAME",
conn,
"MYS3PATH",
schema="MYSCHEMA",
index=False,
if_exists="replace"
)