hisham_osman
11/12/2020, 4:33 AMplugins:
extractors:
- name: tap-vendor-a
namespace: vendor-a
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
executable: tap-spreadsheets-anywhere
capabilities:
- catalog
- discover
- state
config:
tables:
- path: <s3://some_path>
name: staging_table_a
pattern: path_a/table_a_*
start_date: '2020-10-01T00:00:00Z'
key_properties:
- key
format: csv
universal_newlines: false
prefer_number_vs_integer: true
- path: <s3://some_path>
name: staging_table_b
pattern: path_b/table_b_*
start_date: '2020-10-01T00:00:00Z'
key_properties:
- id
- updated_at
format: csv
universal_newlines: false
prefer_number_vs_integer: true
...
would love to have something like:
plugins:
extractors:
- name: tap-vendor-a
namespace: vendor-a
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
executable: tap-spreadsheets-anywhere
capabilities:
- catalog
- discover
- state
config:
tables: PATH_TO_SOME_FILEdouwe_maan
11/12/2020, 5:18 PMtap-csv supports a csv_files_definition setting that you could use: https://meltano.com/plugins/extractors/csv.html#csv-files-definition, but tap-spreadsheets-anywhere doesn't currently have an equivalent. I expect that @eric_simmerman would be open to a contribution to https://github.com/ets/tap-spreadsheets-anywhere that would add that, though!
There's an open Meltano issue to let project plugin definitions (and their configurations) be housed in individual YML files (https://gitlab.com/meltano/meltano/-/issues/2206#note_388496082), which would move this config to extractors/tap-spreadsheets-anywhere.yml and make meltano.yml less heavy, which I think would address your issue.
We could also explore supporting config: path/to/config.{yml,json} so that you can define all of your config (including tables ) in a separate file, or a way to defer to a file for the contents of a specific array or object setting (like tables ) if a string is provided instead of a proper JSON array/object, like tables: path/to/tables.{yml,json} .
If we wanted to support loading a value from a file for arbitrary settings (not just those holding arrays or objects), we would need a way to indicate that the path is not supposed to be interpreted as a string value, but rather as a path to a file holding the value, using some special syntax that wouldn't be confused for or used in regular configuration. Something like "@tables": path/to/tables.yml , which would evaluate to tables: <contents of path/to/tables.yml> in the actual config passed to the plugin.douwe_maan
11/12/2020, 5:20 PMhisham_osman
11/12/2020, 8:22 PMdouwe_maan
11/12/2020, 8:36 PMdouwe_maan
12/02/2020, 9:17 PM