March 2019
Beginner to intermediate
182 pages
4h 6m
English
Let's start by separating logic from the Spark engine.
In this section, we will cover the following topics:
Let's look at the logic first and then the simple test.
So, we have a BonusVerifier object that has only one method, quaifyForBonus, that takes our userTransaction model class. According to our login in the following code, we load user transactions and filter all users that are qualified for a bonus. First, we need to test it to create an RDD and filter it. We need to create a SparkSession and also create data for mocking an RDD or DataFrame, and then test the ...
Read now
Unlock full access