Writes the data from a data source to a directory of Delta files.
ds_write_delta(ds, path, save_mode = SaveMode$OVERWRITE)A list with element file_infos, containing a list of files created.
Each file has fhir_resource_type and absolute_url.
Pathling documentation - Writing Delta
Other data sink functions:
ds_write_ndjson(),
ds_write_parquet(),
ds_write_tables()
pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples("ndjson"))
# Write the data to a directory of Delta files.
data_source %>% ds_write_delta(file.path(tempdir(), "delta"), save_mode = SaveMode$OVERWRITE)
#> $file_infos
#> $file_infos[[1]]
#> $file_infos[[1]]$fhir_resource_type
#> [1] "Condition"
#>
#> $file_infos[[1]]$absolute_url
#> [1] "/tmp/Rtmpp0823Q/delta/Condition.parquet"
#>
#>
#> $file_infos[[2]]
#> $file_infos[[2]]$fhir_resource_type
#> [1] "Patient"
#>
#> $file_infos[[2]]$absolute_url
#> [1] "/tmp/Rtmpp0823Q/delta/Patient.parquet"
#>
#>
#>
pathling_disconnect(pc)