Variants of this have been asked before, but in my case there is not quoted strings in my multi-line.
I have a file like this.
column1|column2
1|test1 test1
test1
2|test2
I want a result like this:(2 lines)
+-----------+------------------+
|column1 |column2 |
+-----------+------------------+
| 1| test1 test1
test1
| 2|test2 |
I tried this:
Dataset<Row> dsTest = session.read()
.option("header", "true")
.option("delimiter", "|")
.option("quote", "")
.option("multiLine", "true")
.csv("test.csv");
and I got this(3 lines)
+-----------+------------------+
|column1 |column2 |
+-----------+------------------+
| 1| test1 test1
test1| null
| 2|test2 |
Can someOne guides me to resolve this.