How to write multiline in Cloudera QuickStart Terminal?

75 views Asked by At

I want to write multiline using | in the terminal. I am using Cloudera quickstart VM.

val csv = spark.read.option("header",true).option("inferSchema",true).csv("hdfs://quickstart.cloudera:8020/user/spark/dataset/retail_db/categories-header")

I am writing this full in single line. How to write using multiple line ? Please Help

3

There are 3 answers

0
0xActor On BEST ANSWER

You can use \. For example: data = [1,2,3].\ pop() After \ you can move on to the next line

0
Rajkumar Sukumar On

Since you are using spark-shell, you can do like this

val csv = spark.read.
option("header",true). option("inferSchema",true). csv("hdfs://quickstart.cloudera:8020/user/spark/dataset/retail_db/categories-header")

Press Enter key after each dot. However if you are using pyspark you have to escape it using \

0
AudioBubble On

I just realized that when the cursor is between () we can use press enter and it will take us to next line .