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.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7c1602e1553e3673c830c7dcf55468bfacd11b896fca4d81286684dbce84096 |
|
MD5 | e373077f339cc11bcd9b1a16fc7b14e3 |
|
BLAKE2b-256 | 0386d5760d6528a04f46170209934482333d4c56b36bb11a0358de5bd37dd7c7 |
Hashes for devart_bigquery_connector-1.1.1-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd20aec053d6382c3162037b448fbca947656fa8e13222683e96bef8d0ab1ce |
|
MD5 | 5efdf2973b409e9d0d44ed75f15a7a4f |
|
BLAKE2b-256 | bf7ecccbb832f51429e1be11c47d9a0dbeca1b44c1de40342d0de43b6fc15815 |
Hashes for devart_bigquery_connector-1.1.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a98d3367dd4b4dd14f236e97c3d5de4ae8c4e2651b8e45e568fba6861041ecf5 |
|
MD5 | 6f0b8414e072433daaed79ec6312247a |
|
BLAKE2b-256 | cd03544ca7ed265127318be61d07a5acc8310f1664e3b5cc979ccd254f87a031 |
Hashes for devart_bigquery_connector-1.1.1-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db658d910fbdb55bfb3a24580a84cab880fa8c8cdbf85324566282aeb294f0fa |
|
MD5 | 49fd7d71b9f2645b75070efd2b154e44 |
|
BLAKE2b-256 | 6540135521bd6a81c0ba7235d8d8b7881a182c383f161d8d970704275b8a2c5a |
Hashes for devart_bigquery_connector-1.1.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08e7701edc2efadc07fe5cb72f99cbfae861615d05688c11e3bd1ddefb4eb030 |
|
MD5 | 1cd07c2126b4b12c03a8ac308c2e430c |
|
BLAKE2b-256 | 5adfba8f3b595418dbf94a264bfdfbc60b637a9253fd02274a10e85fbb0c9ca7 |
Hashes for devart_bigquery_connector-1.1.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b726c22d54233e4a92f095408acaffe38b8a6ee92ef977a807d38328adebdf1f |
|
MD5 | 33ed1011d18ac7b775eb43bb5a6bc523 |
|
BLAKE2b-256 | efd207e76e10df7c0691474a44072cb372a62aef34b569751a025772c0279c67 |
Hashes for devart_bigquery_connector-1.1.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525c0a52a607f2ae5a5ad48e13d32144e663e260b264260f6e6c1472611fa623 |
|
MD5 | 342a8efd4c95ec0ce71e58e3b593a265 |
|
BLAKE2b-256 | bcfb7e4a2914c25dc55184d9c188bea555bc0c45c8b1f23fae54a1c2b866a1ff |
Hashes for devart_bigquery_connector-1.1.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb2486fe2ee4fd6f7bec0d50a94c6b81e7aa6d7e0a5107c2b0a707261009f766 |
|
MD5 | e4122a62e6213c2d2be9655a08b7ba44 |
|
BLAKE2b-256 | 2ec9d7f4ecc760a15efd8acda9436b15801d8c39d449d25eabe7caba78ad8c52 |
Hashes for devart_bigquery_connector-1.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0c950fd7a2be0372bf105f601b9c2c7ed49833034f5f613990866aad212fe29 |
|
MD5 | 096cf5ce0a5566aedfc053e56ade283e |
|
BLAKE2b-256 | 682e21b8ee7b136a822f9e7fb2068cdb66b6fdc640d552f2c2a11f7104197312 |
Hashes for devart_bigquery_connector-1.1.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daa39f56cfb23937a8a5649320c1b0f768fd243df1aa4963c957975547b18d40 |
|
MD5 | 95dad78fc48315a22f86fbbaaca7d31b |
|
BLAKE2b-256 | c2b4abdd552207f4d80af27c1383ac8df797f336d07c69a09a80730f1e31c273 |
Hashes for devart_bigquery_connector-1.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96474b94e7ac08f3c917a5e21ccdb999235e3a367bdedb46c01433f9d9a376cb |
|
MD5 | d5c2c65607adc911641ac4686749ac84 |
|
BLAKE2b-256 | a92105d4c6960bf742c6a3246bf9c7c9e89f2f4e9d2b71244e5795808460c4ca |
Hashes for devart_bigquery_connector-1.1.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f3f7b16b8c17fc244be93217cca8f67ad41874261994a181e2cfaa835b4644e |
|
MD5 | 1e1fad0c967308e578dc43272526c5f7 |
|
BLAKE2b-256 | 1792681025e801270946fb6b14ee5fa5f6a155c11b7906fa5713a0b6955679bc |