Skip to content
Snippets Groups Projects
Commit 23f6171d authored by Daoyuan Wang's avatar Daoyuan Wang Committed by Josh Rosen
Browse files

[SPARK-3985] [Examples] fix file path using os.path.join

Author: Daoyuan Wang <daoyuan.wang@intel.com>

Closes #2834 from adrian-wang/sqlpypath and squashes the following commits:

da7aa95 [Daoyuan Wang] fix file path using path.join
parent adcb7d33
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ if __name__ == "__main__":
# A JSON dataset is pointed to by path.
# The path can be either a single text file or a directory storing text files.
path = os.environ['SPARK_HOME'] + "examples/src/main/resources/people.json"
path = os.path.join(os.environ['SPARK_HOME'], "examples/src/main/resources/people.json")
# Create a SchemaRDD from the file(s) pointed to by path
people = sqlContext.jsonFile(path)
# root
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment