Description Usage Arguments Details
Write a spark_tbl
to JSON
1 | spark_write_json(.data, path, mode = "error", partition_by = NULL, ...)
|
.data |
a |
path |
string, the path where the file is to be saved. |
mode |
string, usually |
partition_by |
string, column names to partition by on disk |
... |
any other named options. See details below. |
For JSON, additional options can be specified using ...
:
#'
(default null), compression codec to use when saving to file. This can be one of the known case-insensitive shorten names (none, bzip2, gzip, lz4, snappy and deflate).
(default yyyy-MM-dd), sets the string that indicates a date format. Custom date formats follow the formats at java.text.SimpleDateFormat. This applies to date type.
(default yyyy-MM-dd'T'HH:mm:ss.SSSXXX), sets the string that indicates a timestamp format. Custom date formats follow the formats at java.text.SimpleDateFormat. This applies to timestamp type.
(by default it is not set), specifies encoding (charset) of saved json files. If it is not set, the UTF-8 charset will be used.
(default \n), defines the line separator that should be used for writing.
More information can be found here: https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/DataFrameWriter.html#json-java.lang.String-
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.