用Python查询Qubole数据

2024-05-14 21:29:13 发布

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

我试图用Python查询Qubole数据,但遇到了一些问题。下面是我的代码:

from qds_sdk.qubole import Qubole

Qubole.configure(api_token="api_token", api_url="https://us.qubole.com/api")

from qds_sdk.commands import *

presto=PrestoCommand.create(query="select A, B from table limit 10", label="presto_shared")

然而,当我试图提取结果时:

presto.get_results()

输出如下:

2021-02-15 12:49:23.449 2021-02-15 12:49:23.446

2021-02-06 08:55:35.367 2021-02-06 08:55:35.363

2021-03-02 20:56:22.565 2021-03-02 20:56:13.678

2021-02-15 12:49:16.473 2021-02-15 12:49:16.47

2021-02-15 12:48:39.467 2021-02-15 12:48:39.462

2021-02-15 12:48:38.776 2021-02-15 12:48:18.892

2021-02-15 12:48:24.96  2021-02-15 12:48:24.956

2021-02-15 12:48:21.234 2021-02-15 12:48:21.23

2021-02-15 12:48:02.686 2021-02-15 12:48:02.684

2021-02-15 12:47:57.592 2021-02-15 12:47:57.589

类类型为“NoType”。。而且,没有表头

我想,get_results()的问题出在哪里了?谢谢


Tags: 数据代码fromimporttokenapigetconfigure

热门问题