我正在使用AWS Athena从S3查询原始数据。由于Athena将查询输出写入S3输出存储桶,所以我曾经这样做:
df = pd.read_csv(OutputLocation)
但这似乎是一种昂贵的方法。最近,我注意到该get_query_results方法boto3返回一个复杂的结果字典。
client = boto3.client('athena')
response = client.get_query_results(
        QueryExecutionId=res['QueryExecutionId']
        )
我面临两个主要问题:
get_query_results为pandas数据框?get_query_results仅返回1000行。如何使用它获得两百万行?