Skip to content

Commit 6a24e64

Browse files
AUTO: Sync ScalarDB docs in English to docs site repo (#1459)
Co-authored-by: josh-wong <[email protected]>
1 parent 28d27e9 commit 6a24e64

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

docs/scalardb-analytics/run-analytical-queries.mdx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ This section describes the prerequisites, setting up ScalarDB Analytics in the S
1919

2020
### Prerequisites
2121

22-
- **ScalarDB Analytics catalog server**: A running instance that manages catalog metadata and connects to your data sources. The server must be set up with at least one data source registered. For setup and data source registration instructions, see [Set up and administer the ScalarDB Analytics catalog server](./administration.mdx).
23-
- **Apache Spark**: A compatible version of Apache Spark. For supported versions, see [Version compatibility](#version-compatibility). If you don't have Spark installed yet, please download the Spark distribution from [Apache's website](https://spark.apache.org/downloads.html).
22+
- **ScalarDB Analytics server:** A running instance that manages catalog information and connects to your data sources. The server must be set up with at least one data source registered. For registering data sources, see [Create a ScalarDB Analytics Catalog](./create-scalardb-analytics-catalog.mdx).
23+
- **Apache Spark:** A compatible version of Apache Spark. For supported versions, see [Version compatibility](#version-compatibility). If you don't have Spark installed yet, please download the Spark distribution from [Apache's website](https://spark.apache.org/downloads.html).
2424

2525
:::note
2626

27-
Apache Spark are built with either Scala 2.12 or Scala 2.13. ScalarDB Analytics supports both versions. You need to be sure which version you are using so that you can select the correct version of ScalarDB Analytics later. You can refer to [Version compatibility](#version-compatibility) for more details.
27+
Apache Spark is built with either Scala 2.12 or Scala 2.13. ScalarDB Analytics supports both versions. You need to be sure which version you are using so that you can select the correct version of ScalarDB Analytics later. For more details, see [Version compatibility](#version-compatibility).
2828

2929
:::
3030

3131
### Set up ScalarDB Analytics in the Spark configuration
3232

33-
ScalarDB Analytics requires specific Spark configurations to integrate with the catalog server.
33+
ScalarDB Analytics requires specific Spark configurations to integrate with ScalarDB Analytics server.
3434

3535
#### Required Spark configurations
3636

@@ -44,7 +44,7 @@ When configuring Spark, you must specify a catalog name that matches the catalog
4444

4545
#### Example configuration
4646

47-
Here's a complete example configuration:
47+
The following is a complete example configuration:
4848

4949
```conf
5050
# 1. ScalarDB Analytics package
@@ -60,43 +60,43 @@ spark.sql.catalog.myanalytics.server.catalog.port 11051
6060
spark.sql.catalog.myanalytics.server.metering.port 11052
6161
```
6262

63-
Replace the placeholders:
63+
The following describes what you should change the content in the angle brackets to:
6464

65-
- `<SPARK_VERSION>`: Your Spark version (e.g., `3.5` or `3.4`)
66-
- `<SCALA_VERSION>`: Your Scala version (e.g., `2.13` or `2.12`)
67-
- `<SCALARDB_ANALYTICS_VERSION>`: The ScalarDB Analytics version (e.g., `3.16.0`)
65+
- `<SPARK_VERSION>`: Your Spark version (for example, `3.5` or `3.4`)
66+
- `<SCALA_VERSION>`: Your Scala version (for example, `2.13` or `2.12`)
67+
- `<SCALARDB_ANALYTICS_VERSION>`: The ScalarDB Analytics version (for example, `3.16.0`)
6868

6969
In this example:
7070

71-
- The catalog name `myanalytics` must match a catalog that exists on your ScalarDB Analytics server
72-
- The ScalarDB Analytics server is running at `analytics-server.example.com`
73-
- Tables will be accessed using the format: `myanalytics.<data_source>.<namespace>.<table>`
71+
- The catalog name `myanalytics` must match a catalog that exists on your ScalarDB Analytics server.
72+
- The ScalarDB Analytics server is running at `analytics-server.example.com`.
73+
- Tables will be accessed using the format: `myanalytics.<data_source>.<namespace>.<table>`.
7474

7575
:::important
7676

77-
The catalog name in your Spark configuration must match the name of a catalog created on the ScalarDB Analytics server using the CLI. For example, if you created a catalog named `production` on the server, you must use `production` as the catalog name in your Spark configuration properties (e.g., `spark.sql.catalog.production`, `spark.sql.catalog.production.server.host`, etc.).
77+
The catalog name in your Spark configuration must match the name of a catalog created on the ScalarDB Analytics server by using the CLI. For example, if you created a catalog named `production` on the server, you must use `production` as the catalog name in your Spark configuration properties (for example, `spark.sql.catalog.production`, `spark.sql.catalog.production.server.host`, etc.).
7878

7979
:::
8080

8181
:::note
8282

83-
Data source configurations are managed by the catalog server. For information on configuring data sources in the catalog server, see [Set up and administer the ScalarDB Analytics catalog server](./administration.mdx#configure-data-sources).
83+
Data source configurations are managed by ScalarDB Analytics server. For information on configuring data sources in ScalarDB Analytics server, see [Create a ScalarDB Analytics Catalog](./create-scalardb-analytics-catalog.mdx).
8484

8585
:::
8686

8787
### Build configuration for Spark applications
8888

8989
When developing Spark applications that use ScalarDB Analytics, you can add the dependency to your build configuration. For example, with Gradle:
9090

91-
```groovy
91+
```kotlin
9292
dependencies {
93-
implementation 'com.scalar-labs:scalardb-analytics-spark-all-<SPARK_VERSION>_<SCALA_VERSION>:<SCALARDB_ANALYTICS_VERSION>'
93+
implementation("com.scalar-labs:scalardb-analytics-spark-all-<SPARK_VERSION>_<SCALA_VERSION>:<SCALARDB_ANALYTICS_VERSION>")
9494
}
9595
```
9696

9797
:::note
9898

99-
If you bundle your application in a fat JAR using plugins like Gradle Shadow or Maven Shade, exclude ScalarDB Analytics from the fat JAR by using configurations such as `provided` or `shadow`.
99+
If you bundle your application in a fat JAR by using plugins like Gradle Shadow or Maven Shade, exclude ScalarDB Analytics from the fat JAR by using configurations such as `provided` or `shadow`.
100100

101101
:::
102102

@@ -116,7 +116,7 @@ Depending on your environment, you may not be able to use all the methods mentio
116116

117117
:::
118118

119-
With all these methods, you can refer to tables in ScalarDB Analytics using the same table identifier format. For details about how ScalarDB Analytics maps catalog information from data sources, refer to [Catalog metadata reference](./administration.mdx#catalog-metadata-reference).
119+
With all these methods, you can refer to tables in ScalarDB Analytics by using the same table identifier format. For details about how ScalarDB Analytics maps catalog information from data sources, see [Catalog information reference](./reference-data-source.mdx#catalog-information-reference).
120120

121121
<Tabs groupId="spark-application-type" queryString>
122122
<TabItem value="spark-driver" label="Spark driver application">
@@ -125,11 +125,11 @@ You can use a commonly used `SparkSession` class for ScalarDB Analytics. Additio
125125

126126
To read data from tables in ScalarDB Analytics, you can use the `spark.sql` or `spark.read.table` function in the same way as when reading a normal Spark table.
127127

128-
First, you need to set up your Java project. For example, if you are using Gradle, you can add the following to your `build.gradle` file:
128+
First, you need to set up your Java project. For example, if you are using Gradle, you can add the following to your `build.gradle.kts` file:
129129

130-
```groovy
130+
```kotlin
131131
dependencies {
132-
implementation 'com.scalar-labs:scalardb-analytics-spark-<SPARK_VERSION>_<SCALA_VERSION>:<SCALARDB_ANALYTICS_VERSION>'
132+
implementation("com.scalar-labs:scalardb-analytics-spark-<SPARK_VERSION>_<SCALA_VERSION>:<SCALARDB_ANALYTICS_VERSION>")
133133
}
134134
```
135135

@@ -191,7 +191,7 @@ The versions of the packages must match the versions of Spark and ScalarDB Analy
191191

192192
:::
193193

194-
You also need to include the Spark Connect client package in your application. For example, if you are using Gradle, you can add the following to your `build.gradle` file:
194+
You also need to include the Spark Connect client package in your application. For example, if you are using Gradle, you can add the following to your `build.gradle.kts` file:
195195

196196
```kotlin
197197
implementation("org.apache.spark:spark-connect-client-jvm_2.12:3.5.3")
@@ -235,11 +235,11 @@ Unfortunately, Spark Thrift JDBC server does not support the Spark features that
235235

236236
ScalarDB Analytics manages its own catalog, containing data sources, namespaces, tables, and columns. That information is automatically mapped to the Spark catalog. In this section, you will learn how ScalarDB Analytics maps its catalog information to the Spark catalog.
237237

238-
For details about how information in the raw data sources is mapped to the ScalarDB Analytics catalog, refer to [Catalog information mappings by data source](./design.mdx#catalog-information-mappings-by-data-source).
238+
For details about how information in the raw data sources is mapped to the ScalarDB Analytics catalog, see [Catalog information mappings by data source](./design.mdx#catalog-information-mappings-by-data-source).
239239

240240
### Catalog structure mapping
241241

242-
ScalarDB Analytics maps catalog structure from data sources to Spark catalogs. Tables from data sources in the ScalarDB Analytics catalog are mapped to Spark tables using the following format:
242+
ScalarDB Analytics maps catalog structure from data sources to Spark catalogs. Tables from data sources in the ScalarDB Analytics catalog are mapped to Spark tables by using the following format:
243243

244244
```console
245245
<CATALOG_NAME>.<DATA_SOURCE_NAME>.<NAMESPACE_NAMES>.<TABLE_NAME>

0 commit comments

Comments
 (0)