0

I am trying to read a fixed-width file with sparklyr.

When using spark_read_text() the file is read as a single column file. Is there a way to split it up in columns?

Thank you

  • [Relevant - Maybe duplicate](https://stackoverflow.com/questions/41810015/sparklyr-separate-one-spark-dataframe-column-into-two-columns) – Sotos Sep 27 '18 at 09:02
  • `substring(str:Column,pos:Int,len:Int)` - https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.sql.functions$@substring(str:org.apache.spark.sql.Column,pos:Int,len:Int):org.apache.spark.sql.Column (where positions are 0 based). – zero323 Sep 28 '18 at 10:39

0 Answers0