使用PyAthena从Python查询AWS Athena

2024-06-26 12:35:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用Pyathena包通过Python查询AWS Athena中的表,但遇到以下错误: “DataNotFoundError:无法加载终结点的数据” 这是我正在使用的代码

import pythena

athena_client = pythena.Athena('database_name', region='us-west-2') 


# Returns results as a pandas dataframe
df = athena_client.execute("select * from database_name.table_name limit 10")

df.sample()

Tags: 数据代码nameimportclientawsdf错误