pathling_read_ndjson {pathling} | R Documentation |
Create a data source from NDJSON
Description
Creates a data source from a directory containing NDJSON files. The files must be named with the resource type code and must have the ".ndjson" extension, e.g. "Patient.ndjson" or "Observation.ndjson".
Usage
pathling_read_ndjson(pc, path, extension = "ndjson", file_name_mapper = NULL)
Arguments
pc |
The PathlingContext object. |
path |
The URI of the directory containing the NDJSON files. |
extension |
The file extension to use when searching for files. Defaults to "ndjson". |
file_name_mapper |
An optional function that maps a filename to the set of resource types that it contains. Currently not implemented. |
Value
A DataSource object that can be used to run queries against the data.
See Also
Pathling documentation - Reading NDJSON
Other data source functions:
pathling_read_bundles()
,
pathling_read_datasets()
,
pathling_read_delta()
,
pathling_read_parquet()
,
pathling_read_tables()
Examples
pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples('ndjson'))
data_source %>% ds_read('Patient') %>% sparklyr::sdf_nrow()
pathling_disconnect(pc)
[Package pathling version 7.0.0 Index]