lamber-ken commented on a change in pull request #1526: [HUDI-1526] Add pyspark
example in quickstart
URL: https://github.com/apache/incubator-hudi/pull/1526#discussion_r410501360
##########
File path: docs/_docs/1_1_quick_start_guide.md
##########
@@ -68,6 +81,27 @@ df.write.format("hudi").
save(basePath)
```
+{% highlight python %}
+inserts =
sc._jvm.org.apache.hudi.QuickstartUtils.convertToStringList(dataGen.generateInserts(10))
+df = spark.read.json(spark.sparkContext.parallelize(inserts, 2))
+
+hudi_options = {
+'hoodie.table.name': tableName,
+'hoodie.datasource.write.recordkey.field': 'uuid',
+'hoodie.datasource.write.partitionpath.field': 'partitionpath',
+'hoodie.datasource.write.table.name': tableName,
+'hoodie.datasource.write.operation': 'insert',
+'hoodie.datasource.write.precombine.field': 'ts',
+'hoodie.upsert.shuffle.parallelism': 2,
+'hoodie.insert.shuffle.parallelism': 2
+}
Review comment:
Add two spaces before each line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services