This is an automated email from the ASF dual-hosted git repository. bhavanisudha pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git
View the commit online: https://github.com/apache/incubator-hudi/commit/2f421df0fe0f6d6d4982be55aa7c4f1b67fc8410 The following commit(s) were added to refs/heads/asf-site by this push: new 2f421df [DOC] Add reload step 2f421df is described below commit 2f421df0fe0f6d6d4982be55aa7c4f1b67fc8410 Author: hongdongdong <[email protected]> AuthorDate: Wed Nov 20 15:28:02 2019 +0800 [DOC] Add reload step --- docs/quickstart.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index 8c2d178..fa04f21 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -75,7 +75,7 @@ val roViewDF = spark. read. format("org.apache.hudi"). load(basePath + "/*/*/*/*") -roViewDF.registerTempTable("hudi_ro_table") +roViewDF.createOrReplaceTempView("hudi_ro_table") spark.sql("select fare, begin_lon, begin_lat, ts from hudi_ro_table where fare > 20.0").show() spark.sql("select _hoodie_commit_time, _hoodie_record_key, _hoodie_partition_path, rider, driver, fare from hudi_ro_table").show() ``` @@ -111,6 +111,13 @@ This can be achieved using Hudi's incremental view and providing a begin time fr We do not need to specify endTime, if we want all changes after the given commit (as is the common case). ```Scala +// reload data +spark. + read. + format("org.apache.hudi"). + load(basePath + "/*/*/*/*"). + createOrReplaceTempView("hudi_ro_table") + val commits = spark.sql("select distinct(_hoodie_commit_time) as commitTime from hudi_ro_table order by commitTime").map(k => k.getString(0)).take(50) val beginTime = commits(commits.length - 2) // commit time we are interested in
