python - 在 Python 中查询 Qubole 数据
问题描述
我正在尝试在 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()有什么问题吗?谢谢!
解决方案
推荐阅读
- javascript - Google Apps 脚本:从 .showModalDialog 表单提交运行两次的函数
- c++ - 用户定义对象的 C++ 长算术表达式优化
- javascript - 在 Django 上导入 JS 文件
- c# - Automapper ProjectTo 嵌套对象
- node.js - 检查字符串是否仅包含数字时出错
- r - RStudio Connect 在应用程序加载之前断开与服务器的连接
- django - 无法使用 LetsEncrypt 证书连接到网站 - nginx
- css - 在 Woocommerce 产品页面上强制布局
- python-3.x - 如何在 Python 3 中单击按钮时停止执行函数?
- c++ - 'double' 和 'const char[5]' 类型的无效操作数到二进制 'operator<<'