Skip to content

Commit 26587da

Browse files
committed
Release 0.42.4.
1 parent 7f0f470 commit 26587da

File tree

2 files changed

+44
-24
lines changed

2 files changed

+44
-24
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release Notes
22

3-
## Next
3+
## 0.42.4 - 2025-06-20
44
* PR #1380: Fixed ImpersonatedCredentials serialization
55
* PR #1381: Added the option to set custom credentials scopes
66
* PR #1384: Support reading from BigQuery tables with spaces in their names

README.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ The latest version of the connector is publicly available in the following links
5757

5858
| version | Link |
5959
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
60-
| Spark 3.5 | `gs://spark-lib/bigquery/spark-3.5-bigquery-0.42.3.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.5-bigquery-0.42.3.jar)) |
61-
| Spark 3.4 | `gs://spark-lib/bigquery/spark-3.4-bigquery-0.42.3.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.4-bigquery-0.42.3.jar)) |
62-
| Spark 3.3 | `gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.3.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.3-bigquery-0.42.3.jar)) |
63-
| Spark 3.2 | `gs://spark-lib/bigquery/spark-3.2-bigquery-0.42.3.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.2-bigquery-0.42.3.jar)) |
64-
| Spark 3.1 | `gs://spark-lib/bigquery/spark-3.1-bigquery-0.42.3.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.1-bigquery-0.42.3.jar)) |
60+
| Spark 3.5 | `gs://spark-lib/bigquery/spark-3.5-bigquery-0.42.4.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.5-bigquery-0.42.4.jar)) |
61+
| Spark 3.4 | `gs://spark-lib/bigquery/spark-3.4-bigquery-0.42.4.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.4-bigquery-0.42.4.jar)) |
62+
| Spark 3.3 | `gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.4.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.3-bigquery-0.42.4.jar)) |
63+
| Spark 3.2 | `gs://spark-lib/bigquery/spark-3.2-bigquery-0.42.4.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.2-bigquery-0.42.4.jar)) |
64+
| Spark 3.1 | `gs://spark-lib/bigquery/spark-3.1-bigquery-0.42.4.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-3.1-bigquery-0.42.4.jar)) |
6565
| Spark 2.4 | `gs://spark-lib/bigquery/spark-2.4-bigquery-0.37.0.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-2.4-bigquery-0.37.0.jar)) |
66-
| Scala 2.13 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.13-0.42.3.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.13-0.42.3.jar)) |
67-
| Scala 2.12 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.3.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.3.jar)) |
66+
| Scala 2.13 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.13-0.42.4.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.13-0.42.4.jar)) |
67+
| Scala 2.12 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.4.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.4.jar)) |
6868
| Scala 2.11 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.29.0.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.29.0.jar)) |
6969

7070
The first six versions are Java based connectors targeting Spark 2.4/3.1/3.2/3.3/3.4/3.5 of all Scala versions built on the new
@@ -107,14 +107,14 @@ repository. It can be used using the `--packages` option or the
107107

108108
| version | Connector Artifact |
109109
|------------|------------------------------------------------------------------------------------|
110-
| Spark 3.5 | `com.google.cloud.spark:spark-3.5-bigquery:0.42.3` |
111-
| Spark 3.4 | `com.google.cloud.spark:spark-3.4-bigquery:0.42.3` |
112-
| Spark 3.3 | `com.google.cloud.spark:spark-3.3-bigquery:0.42.3` |
113-
| Spark 3.2 | `com.google.cloud.spark:spark-3.2-bigquery:0.42.3` |
114-
| Spark 3.1 | `com.google.cloud.spark:spark-3.1-bigquery:0.42.3` |
110+
| Spark 3.5 | `com.google.cloud.spark:spark-3.5-bigquery:0.42.4` |
111+
| Spark 3.4 | `com.google.cloud.spark:spark-3.4-bigquery:0.42.4` |
112+
| Spark 3.3 | `com.google.cloud.spark:spark-3.3-bigquery:0.42.4` |
113+
| Spark 3.2 | `com.google.cloud.spark:spark-3.2-bigquery:0.42.4` |
114+
| Spark 3.1 | `com.google.cloud.spark:spark-3.1-bigquery:0.42.4` |
115115
| Spark 2.4 | `com.google.cloud.spark:spark-2.4-bigquery:0.37.0` |
116-
| Scala 2.13 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.13:0.42.3` |
117-
| Scala 2.12 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.3` |
116+
| Scala 2.13 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.13:0.42.4` |
117+
| Scala 2.12 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.4` |
118118
| Scala 2.11 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.29.0` |
119119

120120
### Specifying the Spark BigQuery connector version in a Dataproc cluster
@@ -124,8 +124,8 @@ Using the standard `--jars` or `--packages` (or alternatively, the `spark.jars`/
124124

125125
To use another version than the built-in one, please do one of the following:
126126

127-
* For Dataproc clusters, using image 2.1 and above, add the following flag on cluster creation to upgrade the version `--metadata SPARK_BQ_CONNECTOR_VERSION=0.42.3`, or `--metadata SPARK_BQ_CONNECTOR_URL=gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.3.jar` to create the cluster with a different jar. The URL can point to any valid connector JAR for the cluster's Spark version.
128-
* For Dataproc serverless batches, add the following property on batch creation to upgrade the version: `--properties dataproc.sparkBqConnector.version=0.42.3`, or `--properties dataproc.sparkBqConnector.uri=gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.3.jar` to create the batch with a different jar. The URL can point to any valid connector JAR for the runtime's Spark version.
127+
* For Dataproc clusters, using image 2.1 and above, add the following flag on cluster creation to upgrade the version `--metadata SPARK_BQ_CONNECTOR_VERSION=0.42.4`, or `--metadata SPARK_BQ_CONNECTOR_URL=gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.4.jar` to create the cluster with a different jar. The URL can point to any valid connector JAR for the cluster's Spark version.
128+
* For Dataproc serverless batches, add the following property on batch creation to upgrade the version: `--properties dataproc.sparkBqConnector.version=0.42.4`, or `--properties dataproc.sparkBqConnector.uri=gs://spark-lib/bigquery/spark-3.3-bigquery-0.42.4.jar` to create the batch with a different jar. The URL can point to any valid connector JAR for the runtime's Spark version.
129129

130130
## Hello World Example
131131

@@ -135,7 +135,7 @@ You can run a simple PySpark wordcount against the API without compilation by ru
135135

136136
```
137137
gcloud dataproc jobs submit pyspark --cluster "$MY_CLUSTER" \
138-
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.3.jar \
138+
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.42.4.jar \
139139
examples/python/shakespeare.py
140140
```
141141

@@ -169,6 +169,16 @@ import com.google.cloud.spark.bigquery._
169169
val df = spark.read.bigquery("bigquery-public-data.samples.shakespeare")
170170
```
171171

172+
The connector supports reading from tables that contain spaces in their names.
173+
174+
**Note on ambiguous table names**: If a table name contains both spaces and a SQL keyword (e.g., "from", "where", "join"), it may be misinterpreted as a SQL query. To resolve this ambiguity, quote the table identifier with backticks \`. For example:
175+
176+
```
177+
df = spark.read \
178+
.format("bigquery") \
179+
.load("`my_project.my_dataset.orders from 2023`")
180+
```
181+
172182
For more information, see additional code samples in
173183
[Python](examples/python/shakespeare.py),
174184
[Scala](spark-bigquery-dsv1/src/main/scala/com/google/cloud/spark/bigquery/examples/Shakespeare.scala)
@@ -924,6 +934,16 @@ word-break:break-word
924934
</td>
925935
<td>Read/Write</td>
926936
</tr>
937+
<tr>
938+
<td><code>credentialsScopes</code>
939+
</td>
940+
<td>Replaces the scopes of the Google Credentials if the credentials type supports that.
941+
If scope replacement is not supported then it does nothing.
942+
<br/>The value should be a comma separated list of valid scopes.
943+
<br/> (Optional)
944+
</td>
945+
<td>Read/Write</td>
946+
</tr>
927947
</table>
928948

929949
Options can also be set outside of the code, using the `--conf` parameter of `spark-submit` or `--properties` parameter
@@ -1195,7 +1215,7 @@ using the following code:
11951215
```python
11961216
from pyspark.sql import SparkSession
11971217
spark = SparkSession.builder \
1198-
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.3") \
1218+
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.4") \
11991219
.getOrCreate()
12001220
df = spark.read.format("bigquery") \
12011221
.load("dataset.table")
@@ -1204,15 +1224,15 @@ df = spark.read.format("bigquery") \
12041224
**Scala:**
12051225
```scala
12061226
val spark = SparkSession.builder
1207-
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.3")
1227+
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.42.4")
12081228
.getOrCreate()
12091229
val df = spark.read.format("bigquery")
12101230
.load("dataset.table")
12111231
```
12121232

12131233
In case Spark cluster is using Scala 2.12 (it's optional for Spark 2.4.x,
12141234
mandatory in 3.0.x), then the relevant package is
1215-
com.google.cloud.spark:spark-bigquery-with-dependencies_**2.12**:0.42.3. In
1235+
com.google.cloud.spark:spark-bigquery-with-dependencies_**2.12**:0.42.4. In
12161236
order to know which Scala version is used, please run the following code:
12171237

12181238
**Python:**
@@ -1236,14 +1256,14 @@ To include the connector in your project:
12361256
<dependency>
12371257
<groupId>com.google.cloud.spark</groupId>
12381258
<artifactId>spark-bigquery-with-dependencies_${scala.version}</artifactId>
1239-
<version>0.42.3</version>
1259+
<version>0.42.4</version>
12401260
</dependency>
12411261
```
12421262

12431263
### SBT
12441264

12451265
```sbt
1246-
libraryDependencies += "com.google.cloud.spark" %% "spark-bigquery-with-dependencies" % "0.42.3"
1266+
libraryDependencies += "com.google.cloud.spark" %% "spark-bigquery-with-dependencies" % "0.42.4"
12471267
```
12481268

12491269
### Connector metrics and how to view them
@@ -1288,7 +1308,7 @@ word-break:break-word
12881308
</table>
12891309

12901310

1291-
**Note:** To use the metrics in the Spark UI page, you need to make sure the `spark-bigquery-metrics-0.42.3.jar` is the class path before starting the history-server and the connector version is `spark-3.2` or above.
1311+
**Note:** To use the metrics in the Spark UI page, you need to make sure the `spark-bigquery-metrics-0.42.4.jar` is the class path before starting the history-server and the connector version is `spark-3.2` or above.
12921312

12931313
## FAQ
12941314

0 commit comments

Comments
 (0)