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
File details
Details for the file another-bigquery-magic-0.1.1.tar.gz
.
File metadata
- Download URL: another-bigquery-magic-0.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85e5c1fd3a4e380af9b161c3a8ef04cd48bc49aba241ea92f235b530a136c34 |
|
MD5 | f72b05ac55c1a69037cc806745e0c8c6 |
|
BLAKE2b-256 | 7fd4aa0a7707712c8dcfc198b7c1c07a7b16df787584c4356e10ef5a2ac8dc7d |
File details
Details for the file another_bigquery_magic-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: another_bigquery_magic-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f165e49422841cdbd5061448c989097e02dbf366846c7f1953845b9ee289cff9 |
|
MD5 | 0d50e5621f9987c70b7ffce7c64090bd |
|
BLAKE2b-256 | c6f853617fee7462d09d980217c91c434d14565e10cc38f47772eedcaef0e044 |