RMLio / yarrrml-parser

A YARRRML parser library and CLI in Javascript
MIT License
43 stars 17 forks source link

Feature/env variables #127

Open SvenLieber opened 3 years ago

SvenLieber commented 3 years ago

Added feature to use a .env file, including test cases

This feature enables the yarrrml-parser to read content of a .env file and replaces dollar variables with curly braces in a YARRRML document accordingly. Thus the yarrrml-parser follows the common practice to define secrets in a .env file.

Mapping files will be more reusable as they can be used in environments with different secrets or any other replaceable value such as sources, targets etc.

Three test cases are provided to test that all variables are replaced and that warnings are emitted when not all variables can be replaced because no environment variable was specified.