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".
pathling_read_ndjson(pc, path, extension = "ndjson", file_name_mapper = NULL)
The PathlingContext object.
The URI of the directory containing the NDJSON files.
The file extension to use when searching for files. Defaults to "ndjson".
An optional function that maps a filename to the set of resource types that it contains. Currently not implemented.
A DataSource object that can be used to run queries against the data.
Pathling documentation - Reading NDJSON
Other data source functions:
pathling_read_bundles()
,
pathling_read_datasets()
,
pathling_read_delta()
,
pathling_read_parquet()
,
pathling_read_tables()
pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples('ndjson'))
data_source %>% ds_read('Patient') %>% sparklyr::sdf_nrow()
#> [1] 9
pathling_disconnect(pc)