Datasources define where and how our data is looked up. A datasource can interact with a variety of sources, from files, databases, REST API’s and more. Jerakia will pass the lookup request and any options off to the datasource defined in the lookup. A lookup can only specify one datasource but different lookups can implement different datasources.
Datasources are defined in the lookup block using the
datasource method. The method takes the datasource name (prefixed with
:) as the first argument, followed by a hash of options
Here is an example of using the file datasource in a fairly standard YAML search hierarchy.