Pyplatform-datawarehouse package provides functions for querying, writing and managing data in Google BiqQuery.
Project description
Pyplatform-datawarehouse package provides functions for querying, writing and managing data in Google BiqQuery.
Installation
pip install pyplatform-datawarehouse
Authentication and environment variables
Refer to main page for documentation on authentication
Exploring the modules
from pyplatform.datawarehouse import *
show_me()
Usage
querying BigQuery table
import pyplatform.datawarehouse as dw
sql = """SELECT Order_ID, Order_Date, Ship_Date, Ship_Mode, Customer_ID, Customer_Name, Segment
FROM `project_id.dataset.sample_superstore` """
df = dw.bq_to_df(sql)
df.head()
# select statemet is enclosed in the stored procedure
sql = """CALL `project_id.dataset.spoc_sample_superstore`();"""
df = dw.bq_to_df(sql)
df.head()
writing dataframe to BigQuery table
import pyplatform.datawarehouse as dw
# df #TODO create dataframe as source
table_id = 'project_id.dataset.sample_superstore'
job = dw.df_to_bq(df,table_id)
print(dw.bq_get_job_info(job))
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyplatform-datawarehouse-2020.12.1.tar.gz.
File metadata
- Download URL: pyplatform-datawarehouse-2020.12.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc75cafe286416d36d5284d4d4fb070729621f02c8efb1f1de23b0d8dc322cda
|
|
| MD5 |
802350bedfc38d073a06fa69cd8dff96
|
|
| BLAKE2b-256 |
f7d8d470c65aa8135bc8b26f4fb485197053c786161ae6cd669f59aa5cd2ee4d
|
File details
Details for the file pyplatform_datawarehouse-2020.12.1-py3-none-any.whl.
File metadata
- Download URL: pyplatform_datawarehouse-2020.12.1-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de8bee1680132089c49b2ebc425ce30782731001cfb765795e7fb958d74fbf3b
|
|
| MD5 |
d4c0b8035d11964f2c0bd83d7e269a21
|
|
| BLAKE2b-256 |
3603aae0ba272801d4de856c58d724200d77a8a66034b781179405f2889b57bb
|