1

I get a failure when trying to authenticate using the bq tool. The reason is because it can't reach out to the googleapis.com domain. I needs to go through a proxy, but I am unsure of where that needs to be setup.

thanks for the help.

1 Answers1

1

I don't think the BigQuery tool currently has support for proxy servers. The underlying httplib2 library does have support, but you'd need to modify the code of the bq client to use it.

ie, here: http://code.google.com/p/google-bigquery-tools/source/browse/bq/bigquery_client.py#321

You should be able to pass parameters like this: httplib2.Http(proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_SOCKS5, 'localhost', 1080))

More info here: http://code.google.com/p/httplib2/wiki/Examples

I'm looking into whether we (Google) can add proxy support natively. Ideally the httplib2 library would also look for an environment variable or similar to determine proxy settings. I've pinged the author on that.

Ryan Boyd
  • 2,978
  • 1
  • 21
  • 19
  • Looks like I may be wrong on this-- the underlying httplib2 library should collect these settings from the environment. Let us know if this isn't working for you: http://code.google.com/p/httplib2/source/browse/python2/httplib2/__init__.py#766 – Ryan Boyd Aug 20 '12 at 18:24
  • I just realized I never replied, but I wanted to let you know I was able to pass parameters as you suggested above and that worked. In the end though, I was able to set the https_proxy environment variable and httplib2 library did pick it up like you thought. Thanks again for the help. – user1590290 Nov 13 '12 at 21:20