jan_fertek
03/09/2021, 1:45 PMmeltano config <extractor> set _schema <entity> <attribute> <key> <value> command?
My env var TAP_SPREADSHEETS_ANYWHERE__SCHEMA_LIST_OF_PRODUCTS_PRODUCT_NUMBER_TYPE=["string", "null"] is only considered if I have the following schema section in `meltano.yml`:
plugins:
extractors:
- name: tap-spreadsheets-anywhere
namespace: tap_spreadsheets_anywhere
pip_url: git+<https://github.com/ets/tap-spreadsheets-anywhere.git>
capabilities:
- catalog
- discover
- state
schema:
list_of_products:
product_number:
type:
- string
- 'null'jan_fertek
03/09/2021, 1:56 PMmeltano.yml in the Docker container. I do not change this configuration file, ELT contex (data source, data target) is set using env vars.
However I didn't find a way to set the data type using env var only.
For now, I'm using the schema_overrides option (https://github.com/ets/tap-spreadsheets-anywhere#configurationway) in TAP_SPREADSHEETS_ANYWHERE_TABLES env var, but this is a way to set the data type to tap-spreadsheets-anywhere only. It is not a universal solution.douwe_maan
03/09/2021, 3:37 PMmeltano.yml .
This is because Meltano only defines the top-level _schema extra (with <TAP>__SCHEMA), and doesn't know about any of the nested settings until they're defined as custom settings and get an env var: https://meltano.com/docs/configuration.html#custom-settings
Meltano doesn't currently parse the "original" schema from the catalog to proactively detect the nested settings and determine their env vars, nor does it eagerly read from the environment and attempt to parse TAP_SPREADSHEETS_ANYWHERE__SCHEMA_LIST_OF_PRODUCTS_PRODUCT_NUMBER_TYPE into _schema.list_of_products.product_number.type , since it's impossible to know just from that string which underscores represent nesting, and which represent actual underscores.douwe_maan
03/09/2021, 3:38 PM