|
Python Connector for Google BigQuery Connecting to Google BigQuery - Python Connector for Google BigQuery |
|
To establish a connection to Google BigQuery, import the connector and use the connect() method with your connection parameters.
First, import the BigQuery connector module:
import devart.bigquery as bigquery
Call the connect() method with the connection parameters for your BigQuery server and obtain a connection object.
response = bigquery.signin()
my_connection = bigquery.connect(
ProjectId="your_project_id",
DataSetId="your_dataset_id",
RefreshToken=response["Refresh Token"]
)
Replace the example values with your actual connection values.
For more information, see Connection parameters.