View source: R/read_json_duckdb.R
read_json_duckdb | R Documentation |
read_json_duckdb()
reads a JSON file using DuckDB's read_json()
table function.
read_json_duckdb(
path,
...,
prudence = c("thrifty", "lavish", "stingy"),
options = list()
)
path |
Path to files, glob patterns |
... |
These dots are for future extensions and must be empty. |
prudence |
Memory protection, controls if DuckDB may convert intermediate results in DuckDB-managed memory to data frames in R memory.
The default is |
options |
Arguments to the DuckDB |
read_csv_duckdb()
, read_parquet_duckdb()
# Create and read a simple JSON file
path <- tempfile("duckplyr_test_", fileext = ".json")
writeLines('[{"a": 1, "b": "x"}, {"a": 2, "b": "y"}]', path)
# Reading needs the json extension
db_exec("INSTALL json")
db_exec("LOAD json")
read_json_duckdb(path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.