diff options
author | Peter Hoffmann <ph@peter-hoffmann.com> | 2015-06-14 11:41:16 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-06-14 11:41:16 -0700 |
commit | f3f2a4397da164f0ddfa5d60bf441099296c4346 (patch) | |
tree | e6be327feadaa7a5957fe0d7953f2a8860fb5e06 /docs | |
parent | 53c16b92a537c392a7c3ebc3ef24c1e86cb1a7a4 (diff) | |
download | spark-f3f2a4397da164f0ddfa5d60bf441099296c4346.tar.gz spark-f3f2a4397da164f0ddfa5d60bf441099296c4346.tar.bz2 spark-f3f2a4397da164f0ddfa5d60bf441099296c4346.zip |
fix read/write mixup
Author: Peter Hoffmann <ph@peter-hoffmann.com>
Closes #6815 from hoffmann/patch-1 and squashes the following commits:
2abb6da [Peter Hoffmann] fix read/write mixup
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sql-programming-guide.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index c5ab074e44..7fed1bf882 100644 --- a/docs/sql-programming-guide.md +++ b/docs/sql-programming-guide.md @@ -995,11 +995,11 @@ List<String> teenagerNames = teenagers.javaRDD().map(new Function<Row, String>() schemaPeople # The DataFrame from the previous example. # DataFrames can be saved as Parquet files, maintaining the schema information. -schemaPeople.read.parquet("people.parquet") +schemaPeople.write.parquet("people.parquet") # Read in the Parquet file created above. Parquet files are self-describing so the schema is preserved. # The result of loading a parquet file is also a DataFrame. -parquetFile = sqlContext.write.parquet("people.parquet") +parquetFile = sqlContext.read.parquet("people.parquet") # Parquet files can also be registered as tables and then used in SQL statements. parquetFile.registerTempTable("parquetFile"); |