Spark SQL – Print Line Command

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s