Advertisement banners are displayed to users in a mobile application (app_id
) in a country (country code
) from an advertiser (advertiser_id
).
When this happens, an impression
event is recorded and stored. Optionally, if the user clicks on the banner, a click
event is recorded.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.spark.sql.types.SQLUserDefinedType | |
@SQLUserDefinedType(udt = classOf[ElementWithCountUDT]) | |
case class ElementWithCount(element:String, count:Int) extends Serializable { | |
override def toString: String = { | |
Seq( | |
element, | |
count |