在Spark 2.3上加载excel(xls)数据时如何获取文件名?

时间:2019-03-06 13:45:30

标签: bigdata apache-spark-2.3

各种测试= spark.read.format(spark.read.format(“ com.crealytics.spark.excel”)。option(“ treatEmptyValuesAsNulls”,“ true”)。option(“ inferSchema”,“ true”) .option(“ addColorColumns”,“ False”)。option(“ useHeader”,“ true”)。option(“ startColumn”,0).load(filePath).withColumn(“ filename”,input_file_name())

0 个答案:

没有答案