Skip to content

Commit 2e1fc9a

Browse files
author
Jim Fulton
committed
first wrong stab at README
1 parent 22bff6b commit 2e1fc9a

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

samples/snippets/README.rst

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.. This file is automatically generated. Do not edit this file directly.
2+
3+
SQLAlchemy support for Google BigQuery Python Samples
4+
===============================================================================
5+
6+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
7+
: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
8+
9+
10+
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.
11+
12+
13+
14+
15+
.. _SQLAlchemy support for Google BigQuery: https://googleapis.dev/python/pybigquery/latest/index.html
16+
17+
18+
19+
20+
21+
Setup
22+
-------------------------------------------------------------------------------
23+
24+
25+
Authentication
26+
++++++++++++++
27+
28+
This sample requires you to have authentication setup. Refer to the
29+
`Authentication Getting Started Guide`_ for instructions on setting up
30+
credentials for applications.
31+
32+
.. _Authentication Getting Started Guide:
33+
https://cloud.google.com/docs/authentication/getting-started
34+
35+
Install Dependencies
36+
++++++++++++++++++++
37+
38+
#. Clone python-docs-samples and change directory to the sample directory you want to use.
39+
40+
.. code-block:: bash
41+
42+
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
43+
44+
#. 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.
45+
46+
.. _Python Development Environment Setup Guide:
47+
https://cloud.google.com/python/setup
48+
49+
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
50+
51+
.. code-block:: bash
52+
53+
$ virtualenv env
54+
$ source env/bin/activate
55+
56+
#. Install the dependencies needed to run the samples.
57+
58+
.. code-block:: bash
59+
60+
$ pip install -r requirements.txt
61+
62+
.. _pip: https://pip.pypa.io/
63+
.. _virtualenv: https://virtualenv.pypa.io/
64+
65+
Samples
66+
-------------------------------------------------------------------------------
67+
68+
Read BigQuery data into Pandas
69+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
70+
71+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
72+
: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
73+
74+
75+
76+
77+
To run this sample:
78+
79+
.. code-block:: bash
80+
81+
$ python pandas_read_sql.py
82+
83+
created_date complaint_description
84+
0 2019-11-25 17:37:18+00:00 Coyote Complaints
85+
1 2020-04-21 15:20:18+00:00 Dangerous/Vicious Dog Investigation
86+
2 2020-07-14 15:06:12+00:00 Mowing City Parks
87+
3 2019-11-11 08:52:19+00:00 School Zone Flasher - Timing/Maintenance
88+
4 2019-11-08 16:02:17+00:00 Park Maintenance - Grounds Electrical Issues
89+
5 2019-11-13 10:04:24+00:00 Coyote Complaints
90+
6 2019-11-02 18:35:51+00:00 Loose Animal Not Dog
91+
7 2019-11-15 12:12:18+00:00 Dangerous/Vicious Dog Investigation
92+
8 2019-12-27 21:41:10+00:00 Animal In Vehicle
93+
9 2020-05-02 11:57:00+00:00 Loose Animal Not Dog
94+
95+
96+
97+
98+
99+
.. _Google Cloud SDK: https://cloud.google.com/sdk/

samples/snippets/README.rst.in

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file is used to generate README.rst
2+
3+
product:
4+
name: SQLAlchemy support for Google BigQuery
5+
short_name: SQLAlchemy BigQuery
6+
url: https://googleapis.dev/python/pybigquery/latest/index.html
7+
description: >
8+
`SQLAlchemy support for Google BigQuery`_ allows SQLAlchemy to be used with
9+
Googe BigQuery, a serverless, highly scalable, and cost-effective
10+
multicloud data warehouse designed for business agility.
11+
12+
setup:
13+
- auth
14+
- install_deps
15+
16+
samples:
17+
- name: Read BigQuery data into Pandas
18+
file: pandas_read_sql.py
19+
show_help: true
20+
21+
folder: snippets

0 commit comments

Comments
 (0)