Re: 回复: For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Gang Li
I will pay attention in the future, thank you very much for your suggestions. -- Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/ - To unsubscribe e-mail: dev-unsubscr...@spark.apache.org

回复: For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Liu Genie
data source in two SQLs, how to read it once? If use a temporary table, the execution process is shown in the following figure <http://apache-spark-developers-list.1001551.n3.nabble.com/file/t3738/tmp1.png> Is there any way to achieve the following figure? <http://apache-spark-develo

Re: For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Gang Li
If use a temporary table, the execution process is shown in the following figure Is there any way to achieve the following figure? than

Re: For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Gang Li
Writing to the temporary table does allow the data source to read once, but writing to the temporary table will have disk I/O operations, and there is no effective use of Spark RDD's memory-based operations -- Sent

Re: For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Yang shun
> > You can do this by creating a temporary table. > 1.Ensure that all fields are included and cached as a dataset when the data is first pulled(age、sex、other...) 2.When outputting to different tables, select different fields of the cached dataset.

For the same data source in two SQLs, how to read it once?

2020-09-09 Thread Gang Li
Hi all, I ran two Spark SQL, they read the same table, partition, but write to different tables. Is there any way to merge them into one SQL, and realize the read data operation is only run once? Suppose there are two SQL: --