Main Content
textFile
Class: matlab.compiler.mlspark.SparkContext
Namespace: matlab.compiler.mlspark
Create an RDD from a text file
Syntax
rdd = textFile(sc,pathToFile)
rdd = textFile(sc,pathToFile,minPartitions)
Description
creates
an RDD from a text file located in rdd
= textFile(sc
,pathToFile
)pathToFile
.
creates
an RDD with minimum partitions specified by rdd
= textFile(sc
,pathToFile
,minPartitions
)minPartitions
.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2016b