World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#3660] docs(spark-connector): add multi spark and scala version for spark connector doc (#3614)
FANNGbf7d2e1bbeb2
diff --git a/docs/how-to-build.md b/docs/how-to-build.mdindex 0d3eb56a61..c1d248e103 100644--- a/docs/how-to-build.md+++ b/docs/how-to-build.md@@ -88,11 +88,17 @@ This software is licensed under the Apache License version 2."with specific module name, like:```shell- ./gradlew spark-connector:spark-connector-runtime:build+ ./gradlew spark-connector:spark-runtime-3.4:build -PscalaVersion=2.12```This creates `gravitino-spark-connector-runtime-{sparkVersion}_{scalaVersion}-{version}.jar`- under the `spark-connector/spark-connector-runtime/build/libs` directory.+ under the `spark-connector/v3.4/spark-runtime/build/libs` directory. You could replace `3.4` with+ `3.3` or `3.5` to specify different Spark versions, replace `2.12` with `2.13` for different Scala+ version. The default Scala version is `2.12` if not specifying `-PscalaVersion`.++ :::info+ Gravitino Spark connector doesn't support Scala 2.13 for Spark3.3.+ ::::::noteThe first time you build the project, downloading the dependencies may take a while. You can adddiff --git a/docs/spark-connector/spark-connector.md b/docs/spark-connector/spark-connector.mdindex 8776e90055..ba236b46d6 100644--- a/docs/spark-connector/spark-connector.md+++ b/docs/spark-connector/spark-connector.md@@ -18,13 +18,17 @@ The Gravitino Spark connector leverages the Spark DataSourceV2 interface to faci## Requirement-* Spark 3.4-* Scala 2.12-* JDK 8,11,17+* Spark 3.3 or 3.4 or 3.5+* Scala 2.12 or 2.13+* JDK 8 or 11 or 17++:::info+Gravitino Spark connector doesn't support Scala 2.13 for Spark3.3.+:::## How to use it-1. [Build](../how-to-build.md) or download the Gravitino spark connector jar, and place it to the classpath of Spark.+1. [Build](../how-to-build.md) or [download](https://mvnrepository.com/artifact/com.datastrato.gravitino/spark-connector-runtime) the Gravitino spark connector jar, and place it to the classpath of Spark.2. Configure the Spark session to use the Gravitino spark connector.| Property | Type | Default Value | Description | Required | Since Version |@@ -39,10 +43,13 @@ The Gravitino Spark connector leverages the Spark DataSourceV2 interface to faci--conf spark.plugins="com.datastrato.gravitino.spark.connector.plugin.GravitinoSparkPlugin" \--conf spark.sql.gravitino.uri=http://127.0.0.1:8090 \--conf spark.sql.gravitino.metalake=test \+--conf spark.sql.gravitino.enableIcebergSupport=true \--conf spark.sql.warehouse.dir=hdfs://127.0.0.1:9000/user/hive/warehouse-hive```-3. Execute the Spark SQL query.+3. [Download](https://iceberg.apache.org/releases/) corresponding runtime jars and place it to the classpath of Spark if using Iceberg catalog.++4. Execute the Spark SQL query.Suppose there are two catalogs in the metalake `test`, `hive` for Hive catalog and `iceberg` for Iceberg catalog.@@ -91,4 +98,4 @@ Gravitino spark connector support the following datatype mapping between Spark a| `BinaryType` | `binary` | 0.5.0 || `ArrayType` | `array` | 0.5.0 || `MapType` | `map` | 0.5.0 |-| `StructType` | `struct` | 0.5.0 |\ No newline at end of file+| `StructType` | `struct` | 0.5.0 |