]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/r/man/read_json_arrow.Rd
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / r / man / read_json_arrow.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/json.R
3 \name{read_json_arrow}
4 \alias{read_json_arrow}
5 \title{Read a JSON file}
6 \usage{
7 read_json_arrow(
8 file,
9 col_select = NULL,
10 as_data_frame = TRUE,
11 schema = NULL,
12 ...
13 )
14 }
15 \arguments{
16 \item{file}{A character file name or URI, \code{raw} vector, an Arrow input stream,
17 or a \code{FileSystem} with path (\code{SubTreeFileSystem}).
18 If a file name, a memory-mapped Arrow \link{InputStream} will be opened and
19 closed when finished; compression will be detected from the file extension
20 and handled automatically. If an input stream is provided, it will be left
21 open.}
22
23 \item{col_select}{A character vector of column names to keep, as in the
24 "select" argument to \code{data.table::fread()}, or a
25 \link[tidyselect:vars_select]{tidy selection specification}
26 of columns, as used in \code{dplyr::select()}.}
27
28 \item{as_data_frame}{Should the function return a \code{data.frame} (default) or
29 an Arrow \link{Table}?}
30
31 \item{schema}{\link{Schema} that describes the table.}
32
33 \item{...}{Additional options passed to \code{JsonTableReader$create()}}
34 }
35 \value{
36 A \code{data.frame}, or a Table if \code{as_data_frame = FALSE}.
37 }
38 \description{
39 Using \link{JsonTableReader}
40 }
41 \examples{
42 \dontshow{if (arrow_with_json()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
43 tf <- tempfile()
44 on.exit(unlink(tf))
45 writeLines('
46 { "hello": 3.5, "world": false, "yo": "thing" }
47 { "hello": 3.25, "world": null }
48 { "hello": 0.0, "world": true, "yo": null }
49 ', tf, useBytes = TRUE)
50 df <- read_json_arrow(tf)
51 \dontshow{\}) # examplesIf}
52 }