March 2019
Beginner to intermediate
182 pages
4h 6m
English
In this section, we will cover the following topics:
Let's start with the mocking data sources from the third section of this chapter—Mocking data sources using partial functions.
Since we were testing UserDataLogic.loadAndGetAmount, notice that everything operates on the DataFrame and thus we had a SparkSession and DataFrame.
Now, let's compare it to the Spark pre-2.x. We can see that this time, we are unable to use DataFrames. Let's assume that the following example shows our logic from the previous Sparks:
test("mock loading data from hive"){ //given import spark.sqlContext.implicits._ val df = spark.sparkContext ...Read now
Unlock full access