corelibraries-devexpress-dot-dataaccess-dot-connectionparameters-03f51e89.md
Contains parameters used to establish a connection with a Google BigQuery dataset.
Namespace : DevExpress.DataAccess.ConnectionParameters
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
public class BigQueryConnectionParameters :
DataConnectionParametersBase,
IConnectionPageBigQuery
Public Class BigQueryConnectionParameters
Inherits DataConnectionParametersBase
Implements IConnectionPageBigQuery
Install the ODBC driver to allow your application to establish a connection with Google BigQuery datasets.
To connect your application with a Google BigQuery dataset, create a BigQueryConnectionParameters class instance and specify the following parameters:
Project ID Gets or sets the ID of the project that contains the required data.Dataset ID Gets or sets the ID of the dataset that contains required tables.Authorization type Gets or sets the authorization type used to establish a connection to data.
For the ODBC driver, only the PrivateKeyFile authorization type is available. For this authorization type, you should specify the following options:
PrivateKeyFileName Gets or sets the path to the P12 private key file.ServiceAccountEmail Gets or sets the service account’s email address.
Note that besides the PrivateKeyFile authorization, you can also use the OAuth authorization, which is available only when the BigQueryProvider driver is installed (no longer maintained and supported).
View Example: BigQueryProvider
For the OAuth authorization, you should specify client ID, client secret, and refresh token options.
Once you configured all required connection parameters, create a SqlDataSource object and assign these parameters (the BigQueryConnectionParameters class instance) to the data source’s ConnectionParameters property. Then, call the data source’s Fill method to load data from the BigQuery dataset.
using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Sql;
//...
var bigQueryConnectionParams = new BigQueryConnectionParameters() {
ProjectID = "projectID",
DataSetID = "datasetID",
AuthorizationType = BigQueryAuthorizationType.PrivateKeyFile,
PrivateKeyFileName = "filename",
ServiceAccountEmail = "email"
};
var sqlDatasource = new SqlDataSource();
sqlDatasource.ConnectionParameters = bigQueryConnectionParams;
sqlDatasource.Fill();
// ...
Imports DevExpress.DataAccess.ConnectionParameters
Imports DevExpress.DataAccess.Sql
'...
Dim bigQueryConnectionParams = New BigQueryConnectionParameters() With {
.ProjectID = "projectID",
.DataSetID = "datasetID",
.AuthorizationType = BigQueryAuthorizationType.PrivateKeyFile,
.PrivateKeyFileName = "filename",
.ServiceAccountEmail = "email"
}
Dim sqlDatasource = New SqlDataSource()
sqlDatasource.ConnectionParameters = bigQueryConnectionParams
sqlDatasource.Fill()
Object DataConnectionParametersBase BigQueryConnectionParameters
See Also