Skip to content

Commit

Permalink
Release 0.25.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
kokoro-team committed Jun 22, 2022
1 parent 7c5855c commit fe49790
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## Next
## 0.25.2 - 2022-06-22

* PR #673: Added integration tests for BigLake external tables.
* PR #674: Increasing default maxParallelism to 10K for BigLake external tables
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ The latest version of the connector is publicly available in the following links

| version | Link |
| --- | --- |
| Scala 2.11 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar)) |
| Scala 2.12 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.1.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.1.jar)) |
| Spark 2.4 | `gs://spark-lib/bigquery/spark-2.4-bigquery-0.25.1-preview.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-2.4-bigquery-0.25.1-preview.jar)) |
| Scala 2.11 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar)) |
| Scala 2.12 | `gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.2.jar` ([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.2.jar)) |
| Spark 2.4 | `gs://spark-lib/bigquery/spark-2.4-bigquery-0.25.2-preview.jar`([HTTP link](https://storage.googleapis.com/spark-lib/bigquery/spark-2.4-bigquery-0.25.2-preview.jar)) |

The only difference between first two connectors is that the former is a Scala 2.11 based connector, targeting Spark 2.3
and 2.4 using Scala 2.11 whereas the latter is a Scala 2.12 based connector, targeting Spark 2.4 and 3.x using Scala 2.12.
Expand All @@ -78,9 +78,9 @@ repository. It can be used using the `--packages` option or the

| version | Connector Artifact |
| --- | --- |
| Scala 2.11 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.1` |
| Scala 2.12 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.25.1` |
| Spark 2.4 | `com.google.cloud.spark:spark-2.4-bigquery:0.25.1-preview` |
| Scala 2.11 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.2` |
| Scala 2.12 | `com.google.cloud.spark:spark-bigquery-with-dependencies_2.12:0.25.2` |
| Spark 2.4 | `com.google.cloud.spark:spark-2.4-bigquery:0.25.2-preview` |

## Hello World Example

Expand All @@ -90,15 +90,15 @@ You can run a simple PySpark wordcount against the API without compilation by ru

```
gcloud dataproc jobs submit pyspark --cluster "$MY_CLUSTER" \
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.1.jar \
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.25.2.jar \
examples/python/shakespeare.py
```

**Dataproc image 1.4 and below**

```
gcloud dataproc jobs submit pyspark --cluster "$MY_CLUSTER" \
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar \
--jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar \
examples/python/shakespeare.py
```

Expand Down Expand Up @@ -870,9 +870,9 @@ creating the job or added during runtime. See examples below:
1) Adding python files while launching pyspark
```
# use appropriate version for jar depending on the scala version
pyspark --jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar
--py-files gs://spark-lib/bigquery/spark-bigquery-support-0.25.1.zip
--files gs://spark-lib/bigquery/spark-bigquery-support-0.25.1.zip
pyspark --jars gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar
--py-files gs://spark-lib/bigquery/spark-bigquery-support-0.25.2.zip
--files gs://spark-lib/bigquery/spark-bigquery-support-0.25.2.zip
```

2) Adding python files in Jupyter Notebook
Expand All @@ -882,14 +882,14 @@ from pyspark import SparkFiles
# use appropriate version for jar depending on the scala version
spark = SparkSession.builder\
.appName('BigNumeric')\
.config('spark.jars', 'gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar')\
.config('spark.submit.pyFiles', 'gs://spark-lib/bigquery/spark-bigquery-support-0.25.1.zip')\
.config('spark.files', 'gs://spark-lib/bigquery/spark-bigquery-support-0.25.1.zip')\
.config('spark.jars', 'gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar')\
.config('spark.submit.pyFiles', 'gs://spark-lib/bigquery/spark-bigquery-support-0.25.2.zip')\
.config('spark.files', 'gs://spark-lib/bigquery/spark-bigquery-support-0.25.2.zip')\
.getOrCreate()
# extract the spark-bigquery-support zip file
import zipfile
with zipfile.ZipFile(SparkFiles.get("spark-bigquery-support-0.25.1.zip")) as zf:
with zipfile.ZipFile(SparkFiles.get("spark-bigquery-support-0.25.2.zip")) as zf:
zf.extractall()
```

Expand All @@ -898,10 +898,10 @@ with zipfile.ZipFile(SparkFiles.get("spark-bigquery-support-0.25.1.zip")) as zf:
# use appropriate version for jar depending on the scala version
spark = SparkSession.builder\
.appName('BigNumeric')\
.config('spark.jars', 'gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.1.jar')\
.config('spark.jars', 'gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.11-0.25.2.jar')\
.getOrCreate()
spark.sparkContext.addPyFile("gs://spark-lib/bigquery/spark-bigquery-support-0.25.1.zip")
spark.sparkContext.addPyFile("gs://spark-lib/bigquery/spark-bigquery-support-0.25.2.zip")
```

Usage Example:
Expand Down Expand Up @@ -1009,7 +1009,7 @@ using the following code:
```python
from pyspark.sql import SparkSession
spark = SparkSession.builder
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.1")
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.2")
.getOrCreate()
df = spark.read.format("bigquery")
.load("dataset.table")
Expand All @@ -1018,15 +1018,15 @@ df = spark.read.format("bigquery")
**Scala:**
```python
val spark = SparkSession.builder
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.1")
.config("spark.jars.packages", "com.google.cloud.spark:spark-bigquery-with-dependencies_2.11:0.25.2")
.getOrCreate()
val df = spark.read.format("bigquery")
.load("dataset.table")
```

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

**Python:**
Expand All @@ -1050,14 +1050,14 @@ To include the connector in your project:
<dependency>
<groupId>com.google.cloud.spark</groupId>
<artifactId>spark-bigquery-with-dependencies_${scala.version}</artifactId>
<version>0.25.1</version>
<version>0.25.2</version>
</dependency>
```

### SBT

```sbt
libraryDependencies += "com.google.cloud.spark" %% "spark-bigquery-with-dependencies" % "0.25.1"
libraryDependencies += "com.google.cloud.spark" %% "spark-bigquery-with-dependencies" % "0.25.2"
```

## FAQ
Expand Down

0 comments on commit fe49790

Please sign in to comment.