Can not import a table from a local file

257 views
Skip to first unread message

April Li

unread,
Apr 30, 2012, 1:20:16 PM4/30/12
to BigQuery discuss
I got the credential with the scope "https://www.googleapis.com/
auth/bigquery". With this credential
I'm able to successfully create Dataset in java API. But it failed on
importing a table from
local csv file via POST method. It returned error message
"Unauthorized". Is any special credential required
to import table from local csv file?

Jeremy Condit

unread,
Apr 30, 2012, 1:33:18 PM4/30/12
to bigquery...@googlegroups.com
Hi April,

Those credentials should be sufficient for any BigQuery API call.  Can you send us the full details of the failed call and the error response so that we can help track down this error?

Thanks!
Jeremy

April Li

unread,
May 1, 2012, 12:51:05 PM5/1/12
to BigQuery discuss
Hi, Jeremy

Here is the Request detail:
[POST /upload/bigquery/v2/projects/603643593719/jobs HTTP/1.1,
Content-Type, Cache-Control, Pragma, User-Agent, Host, Accept,
Connection, Content-Length, null, null, null]

Response from server:
[HTTP/1.1 401 Unauthorized, HTTP Upload Server Built on Apr 23
2012 11:11:29 (1335204689), AuthSub realm="/AuthSubRequest" allowed-
scopes="https://www.googleapis.com/auth/bigquery", application/json,
Tue, 01 May 2012 16:35:19 GMT, no-cache, Fri, 01 Jan 1990 00:00:00
GMT, no-cache, no-store, must-revalidate, 254, null, null, null]

Thanks for your help,
-April

Jeremy Condit

unread,
May 1, 2012, 12:58:12 PM5/1/12
to bigquery...@googlegroups.com
Hi April,

Looks like you're using AuthSub for authentication.  However, BigQuery only supports OAuth 2 for authentication purposes.  You can find more information about authenticating with OAuth 2 here:


If you need additional help getting set up, don't hesitate to ask!  :-)

Cheers,
Jeremy
Reply all
Reply to author
Forward
0 new messages