hivecmd --query doesn't consume the entire option string
Closed this issue · 6 comments
When going through the examples in the README, the show tables example fails.
$ qds.py --vv hivecmd run -q "SHOW TABLES"
https://api.qubole.com/api/v1.2/commands
INFO:qds_connection:[POST] https://api.qubole.com/api/v1.2/commands
INFO:qds_connection:Payload: {
"sample_size": null,
"label": null,
"macros": null,
"query": "SHOW",
"command_type": "HiveCommand",
"can_notify": false,
"script_location": null
}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.qubole.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /api/v1.2/commands HTTP/1.1" 200 682
https://api.qubole.com/api/v1.2/commands/1690268
INFO:qds_connection:[GET] https://api.qubole.com/api/v1.2/commands/1690268
INFO:qds_connection:Payload: null
DEBUG:requests.packages.urllib3.connectionpool:"GET /api/v1.2/commands/1690268 HTTP/1.1" 200 694
ERROR:qds:Cannot fetch results - command Id: 1690268 failed with status: error
Hi Eric,
This is very strange. I tried the same command and it is working for me. Can you try again?
$ qds.py --vv hivecmd run -q "SHOW TABLES"
INFO:qds_connection:[POST] https://api.qubole.com/api/v1.2/commands
INFO:qds_connection:Payload: {
"sample_size": null,
"label": null,
"macros": null,
"query": "SHOW TABLES",
"command_type": "HiveCommand",
"can_notify": false,
"script_location": null
}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.qubole.com
.
.
Eric's command contains only "SHOW", not "SHOW TABLES".
On Wed, May 7, 2014 at 9:01 AM, Rohit Agarwal notifications@github.comwrote:
Hi Eric,
This is very strange. I tried the same command and it is working for me.
Can you try again?$ qds.py --vv hivecmd run -q "SHOW TABLES"
INFO:qds_connection:[POST] https://api.qubole.com/api/v1.2/commands
INFO:qds_connection:Payload: {
"sample_size": null,
"label": null,
"macros": null,
"query": "SHOW TABLES",
"command_type": "HiveCommand",
"can_notify": false,
"script_location": null
}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.qubole.com
.
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-42386250
.
Eric -
I checked command id "1690268" in your account. It looks like the command
got parsed as just "SHOW", and thus failed.
https://api.qubole.com/qpal/index?command_id=1690268&qbol_user_id=1619.
I just tried the same thing, and it works fine for me.
Where are you running the command? What OS / command line tool are you
using?
Thanks,
Minesh
On Tue, May 6, 2014 at 8:31 PM, Rohit Agarwal notifications@github.comwrote:
Hi Eric,
This is very strange. I tried the same command and it is working for me.
Can you try again?$ qds.py --vv hivecmd run -q "SHOW TABLES"
INFO:qds_connection:[POST] https://api.qubole.com/api/v1.2/commands
INFO:qds_connection:Payload: {
"sample_size": null,
"label": null,
"macros": null,
"query": "SHOW TABLES",
"command_type": "HiveCommand",
"can_notify": false,
"script_location": null
}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.qubole.com
.
.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-42386250
.
Minesh Patel
Quboler
skype: minesh.qb
(408)813-7580
Yeah, but in the command line it contains "SHOW TABLES" - I don't know how the parser can fail to assign that complete string to the query argument.
I run a wrapper around my virtualenvs so I don't have to activate them. It looks like I have a bug there. Sorry about the false flag here. It worked for me after activating my virtualenv and calling qds.py directly.
Thank you for taking a look and apologies again.
No worries! Glad to know it worked out.
On Tuesday, May 6, 2014, Eric Larson notifications@github.com wrote:
I run a wrapper around my virtualenvs so I don't have to activate them. It
looks like I have a bug there. Sorry about the false flag here. It worked
for me after activating my virtualenv and calling qds.py directly.Thank you for taking a look and apologies again.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-42389441
.
Minesh Patel
Quboler
skype: minesh.qb
(408)813-7580