forked from googleapis/python-bigquery-sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jim Fulton
committed
Jul 30, 2021
1 parent
22bff6b
commit 2e1fc9a
Showing
2 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
.. This file is automatically generated. Do not edit this file directly. | ||
SQLAlchemy support for Google BigQuery Python Samples | ||
=============================================================================== | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=snippets/README.rst | ||
|
||
|
||
This directory contains samples for SQLAlchemy support for Google BigQuery. `SQLAlchemy support for Google BigQuery`_ allows SQLAlchemy to be used with Googe BigQuery, a serverless, highly scalable, and cost-effective multicloud data warehouse designed for business agility. | ||
|
||
|
||
|
||
|
||
.. _SQLAlchemy support for Google BigQuery: https://googleapis.dev/python/pybigquery/latest/index.html | ||
|
||
|
||
|
||
|
||
|
||
Setup | ||
------------------------------------------------------------------------------- | ||
|
||
|
||
Authentication | ||
++++++++++++++ | ||
|
||
This sample requires you to have authentication setup. Refer to the | ||
`Authentication Getting Started Guide`_ for instructions on setting up | ||
credentials for applications. | ||
|
||
.. _Authentication Getting Started Guide: | ||
https://cloud.google.com/docs/authentication/getting-started | ||
|
||
Install Dependencies | ||
++++++++++++++++++++ | ||
|
||
#. Clone python-docs-samples and change directory to the sample directory you want to use. | ||
|
||
.. code-block:: bash | ||
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git | ||
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. | ||
|
||
.. _Python Development Environment Setup Guide: | ||
https://cloud.google.com/python/setup | ||
|
||
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. | ||
|
||
.. code-block:: bash | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
#. Install the dependencies needed to run the samples. | ||
|
||
.. code-block:: bash | ||
$ pip install -r requirements.txt | ||
.. _pip: https://pip.pypa.io/ | ||
.. _virtualenv: https://virtualenv.pypa.io/ | ||
|
||
Samples | ||
------------------------------------------------------------------------------- | ||
|
||
Read BigQuery data into Pandas | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=snippets/pandas_read_sql.py,snippets/README.rst | ||
|
||
|
||
|
||
|
||
To run this sample: | ||
|
||
.. code-block:: bash | ||
$ python pandas_read_sql.py | ||
created_date complaint_description | ||
0 2019-11-25 17:37:18+00:00 Coyote Complaints | ||
1 2020-04-21 15:20:18+00:00 Dangerous/Vicious Dog Investigation | ||
2 2020-07-14 15:06:12+00:00 Mowing City Parks | ||
3 2019-11-11 08:52:19+00:00 School Zone Flasher - Timing/Maintenance | ||
4 2019-11-08 16:02:17+00:00 Park Maintenance - Grounds Electrical Issues | ||
5 2019-11-13 10:04:24+00:00 Coyote Complaints | ||
6 2019-11-02 18:35:51+00:00 Loose Animal Not Dog | ||
7 2019-11-15 12:12:18+00:00 Dangerous/Vicious Dog Investigation | ||
8 2019-12-27 21:41:10+00:00 Animal In Vehicle | ||
9 2020-05-02 11:57:00+00:00 Loose Animal Not Dog | ||
.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is used to generate README.rst | ||
|
||
product: | ||
name: SQLAlchemy support for Google BigQuery | ||
short_name: SQLAlchemy BigQuery | ||
url: https://googleapis.dev/python/pybigquery/latest/index.html | ||
description: > | ||
`SQLAlchemy support for Google BigQuery`_ allows SQLAlchemy to be used with | ||
Googe BigQuery, a serverless, highly scalable, and cost-effective | ||
multicloud data warehouse designed for business agility. | ||
|
||
setup: | ||
- auth | ||
- install_deps | ||
|
||
samples: | ||
- name: Read BigQuery data into Pandas | ||
file: pandas_read_sql.py | ||
show_help: true | ||
|
||
folder: snippets |