We utilize the “Println” command in Spark SQL using Scala to display the result-set on the screen, and you’ll see how to use it in this post.
Example-1:
scala> x = 20
x: Int = 20
scala> y = 30
y: Int = 30
scala> println(x+y);
50
Example-2:
scala> var x : String = “Hello”
x: String = Hello
scala> var y : String = “World”
y: String = World
scala> println(x,y);
(Hello,World)
I hope you found this post to be informative.
Please join our mailing list to receive more interesting information.