Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyplatform-datawarehouse-2020.8.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pyplatform-datawarehouse-2020.8.2.tar.gz.

File metadata

  • Download URL: pyplatform-datawarehouse-2020.8.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pyplatform-datawarehouse-2020.8.2.tar.gz
Algorithm Hash digest
SHA256 a7373909769459f0678abcfef0ece1440f894b599503fcd9a262974504af1964
MD5 c5e3e15cccc0d751843a151ba20692a8
BLAKE2b-256 3df7b4e715784f3e14751524770814e892ec3c63018391b80c5f9cd7aa840a7d

See more details on using hashes here.

File details

Details for the file pyplatform_datawarehouse-2020.8.2-py3-none-any.whl.

File metadata

  • Download URL: pyplatform_datawarehouse-2020.8.2-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pyplatform_datawarehouse-2020.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb89caf73bae63061395aeed300067f74209cba4b94a1e61ec3a1ed3cccb73f4
MD5 ec0a799de44bf6963ff03a72837f2fd7
BLAKE2b-256 bd8a30079e144dccf218066b68c1d953b9348d0e950c5ac6fa7c0b88c5ff77cf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page