Skip to content

Commit a399cce

Browse files
authored
Merge pull request #113 from marklogic/feature/docs-update
Updating docs for 2.1.0
2 parents c545b58 + c7e55d5 commit a399cce

File tree

9 files changed

+17
-10
lines changed

9 files changed

+17
-10
lines changed

docs/getting-started/jupyter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ connector and also to initialize Spark:
3232

3333
```
3434
import os
35-
os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars "/path/to/marklogic-spark-connector-2.0.0.jar" pyspark-shell'
35+
os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars "/path/to/marklogic-spark-connector-2.1.0.jar" pyspark-shell'
3636
3737
from pyspark.sql import SparkSession
3838
spark = SparkSession.builder.master("local[*]").appName('My Notebook').getOrCreate()
3939
spark.sparkContext.setLogLevel("WARN")
4040
spark
4141
```
4242

43-
The path of `/path/to/marklogic-spark-connector-2.0.0.jar` should be changed to match the location of the connector
43+
The path of `/path/to/marklogic-spark-connector-2.1.0.jar` should be changed to match the location of the connector
4444
jar on your filesystem. You are free to customize the `spark` variable in any manner you see fit as well.
4545

4646
Now that you have an initialized Spark session, you can run any of the examples found in the

docs/getting-started/pyspark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ shell by pressing `ctrl-D`.
2929

3030
Run PySpark from the directory that you downloaded the connector to per the [setup instructions](setup.md):
3131

32-
pyspark --jars marklogic-spark-connector-2.0.0.jar
32+
pyspark --jars marklogic-spark-connector-2.1.0.jar
3333

3434
The `--jars` command line option is PySpark's method for utilizing Spark connectors. Each Spark environment should have
3535
a similar mechanism for including third party connectors; please see the documentation for your particular Spark

docs/reading.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ useful when you need to retrieve data that cannot be easily accessed via Optic,
284284
to that of [MarkLogic's CoRB tool](https://github.com/marklogic-community/corb2) for processing data already in
285285
MarkLogic.
286286

287+
When using this feature, please ensure that your MarkLogic user has the required privileges for the
288+
MarkLogic REST [eval endpoint](https://docs.marklogic.com/REST/POST/v1/eval) and
289+
[invoke endpoint](https://docs.marklogic.com/REST/POST/v1/invoke).
290+
287291
Custom code can be [written in JavaScript](https://docs.marklogic.com/guide/getting-started/javascript) by
288292
configuring the `spark.marklogic.read.javascript` option:
289293

docs/writing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ To easily support that use case, the connector defaults to assuming that each ro
189189
column named "URI" of type string. This matches the convention for reading rows via custom code, which defaults to the
190190
same schema. User-defined custom code is then expected to declare an external variable named "URI".
191191

192+
When using this feature, please ensure that your MarkLogic user has the required privileges for the
193+
MarkLogic REST [eval endpoint](https://docs.marklogic.com/REST/POST/v1/eval) and
194+
[invoke endpoint](https://docs.marklogic.com/REST/POST/v1/invoke).
195+
192196
The following shows an example of reading and processing rows via custom code specified by
193197
`spark.marklogic.write.javascript`, where each row is expected to have a single column named "URI" (the script for
194198
reading rows only returns the first 10 URIs to make it easier to verify that the correct data is logged; you can

examples/entity-aggregation/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
implementation 'org.apache.spark:spark-sql_2.12:3.3.2'
11-
implementation "com.marklogic:marklogic-spark-connector:2.0.0"
10+
implementation 'org.apache.spark:spark-sql_2.12:3.4.1'
11+
implementation "com.marklogic:marklogic-spark-connector:2.1.0"
1212
implementation "org.postgresql:postgresql:42.6.0"
1313
}
1414

examples/getting-started/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'net.saliman.properties' version '1.5.2'
3-
id "com.marklogic.ml-gradle" version "4.5.1"
3+
id "com.marklogic.ml-gradle" version "4.6.0"
44
}
55

66
repositories {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

examples/getting-started/marklogic-spark-getting-started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"source": [
5454
"# Make the MarkLogic connector available to the underlying PySpark application.\n",
5555
"import os\n",
56-
"os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars \"marklogic-spark-connector-2.0.0.jar\" pyspark-shell'\n",
56+
"os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars \"marklogic-spark-connector-2.1.0.jar\" pyspark-shell'\n",
5757
"\n",
5858
"# Define the connection details for the getting-started example application.\n",
5959
"client_uri = \"spark-example-user:password@localhost:8003\"\n",

examples/java-dependency/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ plugins {
33
}
44

55
repositories {
6-
mavenLocal()
76
mavenCentral()
87
}
98

109
dependencies {
1110
implementation 'org.apache.spark:spark-sql_2.12:3.4.1'
12-
implementation 'com.marklogic:marklogic-spark-connector:2.1-SNAPSHOT'
11+
implementation 'com.marklogic:marklogic-spark-connector:2.1.0'
1312
}
1413

1514
task runApp(type: JavaExec) {

0 commit comments

Comments
 (0)