Quantcast
Channel: How to create a dataFame from a textfile in Spark - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by s.polam for How to create a dataFame from a textfile in Spark

Check below code.May be your expected output is wrong.00781/10.0 =78.1 not 7.801001/10.0 = 100.1 not 10.0scala> val df = spark.read.text("/tmp/data")df: org.apache.spark.sql.DataFrame = [value:...

View Article



How to create a dataFame from a textfile in Spark

I have a textfile in HDFS and the format is like:0029029070999991901010106004+64333+023450FM-12+00001N9-00781+3810035029070999991902010113004+64333+023450FM-12+00001N9-01001+381What I trying to do is...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images