spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatorsmile <...@git.apache.org>
Subject [GitHub] spark pull request #17938: [SPARK-20694][DOCS][SQL] Document DataFrameWriter...
Date Sun, 14 May 2017 03:36:34 GMT
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17938#discussion_r116371615
  
    --- Diff: docs/sql-programming-guide.md ---
    @@ -581,6 +581,113 @@ Starting from Spark 2.1, persistent datasource tables have per-partition
metadat
     
     Note that partition information is not gathered by default when creating external datasource
tables (those with a `path` option). To sync the partition information in the metastore, you
can invoke `MSCK REPAIR TABLE`.
     
    +### Bucketing, Sorting and Partitioning
    +
    +For file-based data source it is also possible to bucket and sort or partition the output.

    +Bucketing and sorting is applicable only to persistent tables:
    +
    +<div class="codetabs">
    +
    +<div data-lang="scala"  markdown="1">
    +{% include_example write_sorting_and_bucketing scala/org/apache/spark/examples/sql/SQLDataSourceExample.scala
%}
    +</div>
    +
    +<div data-lang="java"  markdown="1">
    +{% include_example write_sorting_and_bucketing java/org/apache/spark/examples/sql/JavaSQLDataSourceExample.java
%}
    +</div>
    +
    +<div data-lang="python"  markdown="1">
    +{% include_example write_sorting_and_bucketing python/sql/datasource.py %}
    +</div>
    +
    +<div data-lang="sql"  markdown="1">
    +
    +{% highlight sql %}
    +
    +CREATE TABLE users_bucketed_by_name(
    +  name STRING,
    +  favorite_color STRING,
    +  favorite_NUMBERS array<integer>
    +) USING parquet 
    +CLUSTERED BY(name) INTO 42 BUCKETS;
    --- End diff --
    
    Could you please use the same table names `people_bucketed` with the same column names
in the example? Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message