Unofficial IPython magic command for bigquery
Project description
Unofficial BigQuery Magic Command
Installation
# from pypi
$ pip install another-bigquery-magic
# alternatively, from github
$ git clone https://github.com/kota7/another-bigquery-magic.git --depth 1
$ pip install -U ./another-bigquery-magic
Usage
# Set the project ID
project_id = "<project-id>"
!gcloud config set project {project_id}
# Load the bq magic command
%load_ext bq
# If already authenticated, we can run a query as below:
%bq SELECT 1 AS test
Example of authentication methods
# Authentication on colab
from google.colab import auth
auth.authenticate_user()
# Authentication by user log-in
# Note: to access external table with google drive, we also need "https://www.googleapis.com/auth/drive" in the scope
!gcloud auth application-default login --scopes="https://www.googleapis.com/auth/bigquery"
# Authentication with a local json file
jsonfile = "<json-file-path>"
%config BigqueryMagic.localjson = jsonfile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for another-bigquery-magic-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85e5c1fd3a4e380af9b161c3a8ef04cd48bc49aba241ea92f235b530a136c34 |
|
MD5 | f72b05ac55c1a69037cc806745e0c8c6 |
|
BLAKE2b-256 | 7fd4aa0a7707712c8dcfc198b7c1c07a7b16df787584c4356e10ef5a2ac8dc7d |
Close
Hashes for another_bigquery_magic-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f165e49422841cdbd5061448c989097e02dbf366846c7f1953845b9ee289cff9 |
|
MD5 | 0d50e5621f9987c70b7ffce7c64090bd |
|
BLAKE2b-256 | c6f853617fee7462d09d980217c91c434d14565e10cc38f47772eedcaef0e044 |