Skip to content

Dots args to get() #8

Description

@ianmcook

I'm not sure if this is a good idea, but I'll throw it out here: What if config::get() could take named dots arguments and evaluate them in !expr expressions in config.yml files? This would provide a useful way to add context dependence to configuration without using environment variables.

A practical example: sparklyr::spark_connect() calls sparklyr::spark_config() which in turn calls config::get(). Say you wanted to specify Spark configuration parameters in config.yml, but make them dependent on the master argument to spark_connect(). If the master argument was passed through in the dots to config::get(), then you could have a config.yml file like this:

default:
  some.setting: !expr ifelse(master == "local", "foo", "bar")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions