Query Qubole data in Python

357 views Asked by At

I'm trying to query Qubole data in Python, but running into some issues. Below is my code:

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")

However, when I tried to extract the result:

presto.get_results()

The output is like this:

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

The class type is "NoType".. Also, no table headers...

I guess, something was wrong with get_results()? Thanks!

0

There are 0 answers