# Read the YAML file
test_config <- system.file("config", "default_config.yml", package = "connector")
file.copy(test_config, "test_config.yaml")
# Add a new datasource
# Define the backend as a named list
new_backend <- list(
type = "connector_fs",
path = "test"
)
# Add a new datasource with the defined backend
config <- add_datasource("test_config.yaml", "new_datasource", new_backend)
# Remove a datasource
config <- remove_datasource("test_config.yaml", "new_datasource")
unlink("test_config.yaml")
Run the code above in your browser using DataLab