ds_write_ndjson {pathling}R Documentation

Write FHIR data to NDJSON files

Description

Writes the data from a data source to a directory of NDJSON files. The files will be named using the resource type and the ".ndjson" extension.

Usage

ds_write_ndjson(ds, path, save_mode = SaveMode$ERROR, file_name_mapper = NULL)

Arguments

ds

The DataSource object.

path

The URI of the directory to write the files to.

save_mode

The save mode to use when writing the data.

file_name_mapper

An optional function that can be used to customise the mapping of the resource type to the file name. Currently not implemented.

Value

No return value, called for side effects only.

See Also

Pathling documentation - Writing NDJSON

Other data sink functions: ds_write_delta(), ds_write_parquet(), ds_write_tables()

Examples


pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples('ndjson'))

# Write the data to a directory of NDJSON files.
data_source %>% ds_write_ndjson(file.path(tempdir(), 'ndjson'))

pathling_disconnect(pc)


[Package pathling version 7.0.0 Index]