Are there any good examples of how to use the `MEL...
# plugins-general
j
Are there any good examples of how to use the
MELTANO_MAP_TRANSFORMER_STREAM_MAPS
environment variable. Meltano Hub mentions it but it’s not immediately apparent to me what it overwrites because there is a separate
stream_maps
key for each
mapping
in the
meltano.yml
file which begs the question: when I use this variable which mapping is it going to control?
e
Hey Josh! Does this help?
j
ah, almost. I’m thinking more along the lines of the way to handle a config like this:
Copy code
mappers:
  - name: meltano-map-transformer
    variant: meltano
    pip_url: git+<https://github.com/MeltanoLabs/meltano-map-transform.git>
    settings:
    - name: stream_maps
      kind: object
    mappings:
    - name: mapping1
      config:
        stream_maps:
          'foo-bar':
            spam:
    - name: mapping2
      config:
        stream_maps:
          'foo-eggs':
            spam: str(spam)
I’ve actually gotten the
MELTANO_MAP_TRANSFORMER_STREAM_MAPS
variable to work and actually do it’s thing when I run the mapping. That surprised me a little bit because how does it tell the difference between
mapping1
and
mapping2
. Maybe it doesn’t care? 🤷
I take that back, I thought it worked, but it didn’t. I’m not using an sdk-based tap so I can’t use the env vars for the tap, unfortunately.
e
I see, yeah the env var does not make a distinction between mappings of a single mapper and it's a 🐛 in my opinion. Do log an issue in github.