New level of functionality and performance in data access via Python
Project description
Python Connector for Google BigQuery
Python Connector for Google BigQuery is a connectivity solution for accessing the Google BigQuery data warehouse from Python applications. It fully implements the Python DB API 2.0 specification. The connector is distributed as a wheel package for Windows and Windows Server.
GoogleSQL for BigQuery
The connector fully supports the BigQuery SQL dialects, data types, and query syntax, including functions, operators, and conditional expressions. Examples of supported BigQuery functions:
- Aggregate functions
- Array functions
- Datetime functions
- Navigation functions
Using the connector
To retrieve data from a database:
Import the module.
import devart.bigquery
Connect to a database using the connect()
module method and obtain a connection
object:
If you have a refresh token, pass it in the connection string.
my_connection = devart.bigquery.connect(
ProjectId="your_project_id;",
DataSetId="your_dataset_id",
RefreshToken="your_refresh_token"
)
If you don't have a refresh token, obtain it in the following way.
response = devart.bigquery.signin()
my_connection = devart.bigquery.connect(
ProjectId="your_project_id",
DataSetId="your_dataset_id",
RefreshToken=response["Refresh Token"]
)
Create a cursor
object using the cursor()
connection method.
my_cursor = my_connection.cursor()
Execute the SQL statement using the execute()
cursor method.
my_cursor.execute("SELECT * FROM employees")
Retrieve the result set using one of the fetch*()
cursor methods.
for row in my_cursor.fetchall():
print(row)
Ordering and activating the license
You can purchase a license for the connector on the ordering page:
https://www.devart.com/python/bigquery/ordering.html
To activate the license, follow the instructions in the documentation:
https://docs.devart.com/python/bigquery/activate-a-license.htm
What's new
Python Connector for Google BigQuery 1.1
- Added connection pooling
- Added activation with a license key
- Added the subscription license type
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 Distributions
Built Distributions
Hashes for devart_bigquery_connector-1.1.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8cf1f08f1f026bfdb9bbd77e5d72b69795b3525e104df5333aa277908b8ef35 |
|
MD5 | e45a3d45e2df927254c5304257a3cabf |
|
BLAKE2b-256 | d5a321191c658428278001589fa4a37d1fe4234b4a94fb0a26d29f51c23bde22 |
Hashes for devart_bigquery_connector-1.1.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf0f958b946deb97a1e7b3ad63b0fcc83921b1b9b730a190133880f127daaa40 |
|
MD5 | 5abaf5316c0841e7edb607772a42b146 |
|
BLAKE2b-256 | 77b2b9a1dcfe6bd5fc485861840a1f7cfbbceeaf3e56fd52303dbb07fbddcbaf |
Hashes for devart_bigquery_connector-1.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bdb151518000079393ecec589a80ea2754c949b43fffae9c399f7203c78eab3 |
|
MD5 | 0d75ba12617389b67bf364ba53d7fb23 |
|
BLAKE2b-256 | 7a8e20f8fd1e67597960f7b3459e53be31febfa98537ad3b5999f22e852c564d |
Hashes for devart_bigquery_connector-1.1.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67bae8203c54b2c0a63f98aeb382fb058c5b489f6baefbe16cab18c3908b8030 |
|
MD5 | 08fb6a98b4b3074c2e6ee127c6a73388 |
|
BLAKE2b-256 | 85353b7232fccb5e721bb9bba5bdea3dfb18a4470677f88d64cbf6655fc7054c |
Hashes for devart_bigquery_connector-1.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdb3da49333d004fefbf707b7a76352a7aa6daec972a1f0f60cce704428492e |
|
MD5 | 6120192ed24bd532a5af3eb28141b37e |
|
BLAKE2b-256 | de12a6e92e95d596a6124b4cd8679b294aa20b9aeeb98fda7b5bc829575dd9db |
Hashes for devart_bigquery_connector-1.1.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a66153ce5064d0bcb905ce35fca0fca8408600cbee1600ec0e4da4b37c100cb7 |
|
MD5 | c1034694c2e9917d3cf7a253be7bc0f2 |
|
BLAKE2b-256 | af7d4588bd564f9591386b453777dff95d3b60e05ff375a4b5cb1212aec0e56c |
Hashes for devart_bigquery_connector-1.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2338c8ecfca080f676a650f2a769631d7029ea925f64caaf0169d7e93f8a608 |
|
MD5 | cee0061cebfda5c2676badab5312f6f3 |
|
BLAKE2b-256 | d1f8e5aad905cdd076375926c975352ab5fb2d7b2bd8efb9749b62cbe18ad883 |
Hashes for devart_bigquery_connector-1.1.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36ac694a038db9af4afb53ddf09af6008997b74d379335a02010a55f84fc3edb |
|
MD5 | ec90c230bd77177f450235d6a2d435e5 |
|
BLAKE2b-256 | b7f93b90157824b9ee0ff366f536774180a309c905ddf3cc5b77991dc4110d89 |
Hashes for devart_bigquery_connector-1.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 722dd997d677ca1ef477d470180bc1dba4f004565e3f37c1ee4a2c03831e232f |
|
MD5 | 5ee90adce26b5a350c10db70a5c44e02 |
|
BLAKE2b-256 | fb9e55f0b574fbdc2e1b94ac24c1fb905acee896b08a91a32194266b76181a62 |
Hashes for devart_bigquery_connector-1.1.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b06323ceb3d578c0232326d27f6cc2a9cf0200b9a3b7b6b206ba9c41d5cef16c |
|
MD5 | 26b08aebba95bfa106fa5553f8bca3ff |
|
BLAKE2b-256 | c118f499e55aa6244ff9a81710ad47a9f18f852c86173ffdb107578168ea4b9e |
Hashes for devart_bigquery_connector-1.1.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd68eacd765596d52acec792005dc128eabf2eb8346a88aba4c5693cbfe34ed |
|
MD5 | 9852d4e32065dca4b4a223bbd30bd2cf |
|
BLAKE2b-256 | 567d3acef837993a7a58b639bec9d5e87fce140530b1538e2a85673aed0a4ed7 |
Hashes for devart_bigquery_connector-1.1.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e6072ccb73f54eab5fc4a5214e15edb08e45fde60d6bf311d5ff4f8772e169 |
|
MD5 | 5fb9753b38fba00847ce4f9f34e863c4 |
|
BLAKE2b-256 | d930604fbbea389d11b4c25ac7992afc6a06885230210fbb1a57914a50f27488 |