How to split a single Dataset column to multiple columns in spark. I found something in pyspark and tried to implement the same approach in java,but how can i extend this to n
columns without specifying any schema?
Dataset Loooks like this
data |
+--------------------------------------------------------------------------------------------------------------------------------+
|0311111111111111|00000005067242541501|18275008905683|86.80||DESC\|123|10000003|2|1145 |
|0311111111111111|00000005067242541501|B8426621002A|500.00||DESC\|TRF |10000015|28|1170 |
+--------------------------------------------------------------------------------------------------------------------------------+
Columns:
id, tid, mid, amount, mname, desc, brand, brandId, mcc
**The desc column can contain |
which is also field dilimiter.In the case where fields is having '|' can we wrap the field in double quotes?