neo4j-field / pyingest

Apache License 2.0
49 stars 14 forks source link

Support abbreviations in config #7

Closed mholford-neo closed 3 years ago

mholford-neo commented 3 years ago

Most applicable would be to allow user to avoid specifying full path string in each file stanza. Abbreviation keys would be defined dynamically in the main part of config and then applied to the file stanzas. Abbreviation keys are of the form "abbrev." where everything in is the key. In the file stanzas, the key will be enclosed with #{}. What keys are found will be replaced with their values prior to execution of the file stanza.

Example config.yml:

abbrev.path: /home/matt/many/arbitrarily/long/sub/directories/that/we/want/to/avoid/listing/over/and/over/again server_uri: localhost:7687 admin_user: .... ...... files: -url: #{path}/file_to_ingest.csv cql: ......

mholford-neo commented 3 years ago

On second thought... Let's simplify this to specifying basepath(s) only. Can start with just one (should handle most cases) and add support for multiple if it seems useful. New tix to follow