Apache.Arrow.Adbc.Drivers.BigQuery
0.18.0
dotnet add package Apache.Arrow.Adbc.Drivers.BigQuery --version 0.18.0
NuGet\Install-Package Apache.Arrow.Adbc.Drivers.BigQuery -Version 0.18.0
<PackageReference Include="Apache.Arrow.Adbc.Drivers.BigQuery" Version="0.18.0" />
<PackageVersion Include="Apache.Arrow.Adbc.Drivers.BigQuery" Version="0.18.0" />
<PackageReference Include="Apache.Arrow.Adbc.Drivers.BigQuery" />
paket add Apache.Arrow.Adbc.Drivers.BigQuery --version 0.18.0
#r "nuget: Apache.Arrow.Adbc.Drivers.BigQuery, 0.18.0"
#addin nuget:?package=Apache.Arrow.Adbc.Drivers.BigQuery&version=0.18.0
#tool nuget:?package=Apache.Arrow.Adbc.Drivers.BigQuery&version=0.18.0
BigQuery
The BigQuery ADBC driver wraps a BigQueryClient object for working with Google BigQuery data.
Supported Features
Authentication
The ADBC driver supports both Service and User accounts for use with BigQuery authentication.
Authorization
The ADBC driver passes the configured credentials to BigQuery, but you may need to ensure the credentials have proper authorization to perform operations such as read and write.
Parameters
The following parameters can be used to configure the driver behavior. The parameters are case sensitive.
adbc.bigquery.access_token<br> Sets the access token to use as the credential. Currently, this is for Microsoft Entra, but this could be used for other OAuth implementations as well.
adbc.bigquery.audience_uri<br> Sets the audience URI for the authentication token. Currently, this is for Microsoft Entra, but this could be used for other OAuth implementations as well.
adbc.bigquery.allow_large_results<br>
Sets the AllowLargeResults value of the QueryOptions to true
if configured; otherwise, the default is false
.
adbc.bigquery.auth_type<br>
Required. Must be user
, aad
(for Microsoft Entra) or service
.
adbc.bigquery.billing_project_id<br> The Project ID used for accessing billing BigQuery. If not specified, will default to the detected project ID.
adbc.bigquery.client_id<br>
The OAuth client ID. Required for user
authentication.
adbc.bigquery.client_secret<br>
The OAuth client secret. Required for user
authentication.
adbc.bigquery.client.timeout<br> Optional. Sets the timeout (in seconds) for the BigQueryClient. Similar to a ConnectionTimeout.
adbc.bigquery.auth_json_credential<br>
Required if using service
authentication. This value is passed to the GoogleCredential.FromJson method.
adbc.bigquery.get_query_results_options.timeout<br> Optional. Sets the timeout (in seconds) for the GetQueryResultsOptions value. If not set, defaults to 5 minutes. Similar to a CommandTimeout.
adbc.bigquery.maximum_retries<br> Optional. The maximum number of retries. Defaults to 5.
adbc.bigquery.max_fetch_concurrency<br> Optional. Sets the maxStreamCount for the CreateReadSession method. If not set, defaults to 1.
adbc.bigquery.multiple_statement.statement_type<br> Optional. When executing multiple statements, limit the type of statement returned. If not set, all types of statements are returned.
adbc.bigquery.multiple_statement.statement_index<br> Optional. When executing multiple statements, specify the result of the statement to be returned (Minimum value is 1). If not set, the result of the first statement is returned.
adbc.bigquery.multiple_statement.evaluation_kind<br> Optional. When executing multiple statements, limit the evaluation kind returned. If not set, all evaluation kinds are returned.
adbc.bigquery.include_constraints_getobjects<br>
Optional. Some callers do not need the constraint details when they get the table information and can improve the speed of obtaining the results. Setting this value to "false"
will not include the constraint details. The default value is "true"
.
adbc.bigquery.include_public_project_id<br>
Include the bigquery-public-data
project ID with the list of project IDs.
adbc.bigquery.large_results_destination_table<br>
Optional. Sets the DestinationTable value of the QueryOptions if configured. Expects the format to be {projectId}.{datasetId}.{tableId}
to set the corresponding values in the TableReference class.
adbc.bigquery.project_id<br> The Project ID used for accessing BigQuery. If not specified, will default to detect the projectIds the credentials have access to.
adbc.bigquery.refresh_token<br>
The refresh token used for when the generated OAuth token expires. Required for user
authentication.
adbc.bigquery.retry_delay_ms<br>
Optional The delay between retries. Defaults to 200ms. The retries could take up to adbc.bigquery.maximum_retries
x adbc.bigquery.retry_delay_ms
to complete.
adbc.bigquery.scopes<br> Optional. Comma separated list of scopes to include for the credential.
adbc.bigquery.use_legacy_sql<br>
Sets the UseLegacySql value of the QueryOptions to true
if configured; otherwise, the default is false
.
Type Support
There are some limitations to both C# and the C# Arrow implementation that limit how BigQuery data types that can be represented by the ADBC driver. For example, the BIGNUMERIC
type in BigQuery does not have a large value equivalent to C#.
The following table depicts how the BigQuery ADBC driver converts a BigQuery type to an Arrow type.
BigQuery Type | Arrow Type | C# Type |
---|---|---|
BIGNUMERIC | Decimal256 | string |
BOOL | Boolean | bool |
BYTES | Binary | byte[] |
DATE | Date32 | DateTime |
DATETIME | Timestamp | DateTime |
FLOAT64 | Double | double |
GEOGRAPHY | String | string |
INT64 | Int64 | long |
NUMERIC | Decimal128 | SqlDecimal |
STRING | String | string |
STRUCT | String+ | string |
TIME | Time64 | long |
TIMESTAMP | Timestamp | DateTimeOffset |
+A JSON string
See Arrow Schema Details for how BigQuery handles Arrow types.
Microsoft Entra
The driver supports authenticating with a Microsoft Entra ID. For long running operations, the Entra token may timeout if the operation takes longer than the Entra token's lifetime. The driver has the ability to perform token refreshes by subscribing to the UpdateToken
delegate on the BigQueryConnection
. In this scenario, the driver will attempt to perform an operation. If that operation fails due to an Unauthorized error, then the token will be refreshed via the UpdateToken
delegate.
Sample code to refresh the token:
Dictionary<string,string> properties = ...;
BigQueryConnection connection = new BigQueryConnection(properties);
connection.UpdateToken = () => Task.Run(() =>
{
connection.SetOption(BigQueryParameters.AccessToken, GetAccessToken());
});
In the sample above, when a new token is needed, the delegate is invoked and updates the adbc.bigquery.access_token
parameter on the connection object.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- Apache.Arrow.Adbc (>= 0.18.0)
- Google.Cloud.BigQuery.Storage.V1 (>= 3.17.0)
- Google.Cloud.BigQuery.V2 (>= 3.11.0)
- System.Text.Json (>= 8.0.5)
-
.NETStandard 2.0
- Apache.Arrow.Adbc (>= 0.18.0)
- Google.Cloud.BigQuery.Storage.V1 (>= 3.17.0)
- Google.Cloud.BigQuery.V2 (>= 3.11.0)
- System.Net.Http.WinHttpHandler (>= 8.0.2)
- System.Text.Json (>= 8.0.5)
-
net6.0
- Apache.Arrow.Adbc (>= 0.18.0)
- Google.Cloud.BigQuery.Storage.V1 (>= 3.17.0)
- Google.Cloud.BigQuery.V2 (>= 3.11.0)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Apache.Arrow.Adbc.Drivers.BigQuery:
Repository | Stars |
---|---|
apache/arrow-adbc
Database connectivity API standard and libraries for Apache Arrow
|