We are developing a custom mapper plugin that tran...
# meltano-plugin-development
r
We are developing a custom mapper plugin that transforms data to the Fivetran format. It appears we have to define at least a single
mapping
in the
meltano.yml
for it to work with
meltano run
Copy code
mappers:
  - name: mapper-fivetran
    namespace: mapper_fivetran
    variant: matatika
    pip_url: -e /home/reuben/Documents/mappers/mapper-fivetran
    mappings:
    - name: fivetran
otherwise we get the error message
block violates set requirements: Expected unique mappings name not the mapper plugin name: mapper-fivetran
. Would it be possible/does it makes sense to reference a mapper plugin with predefined behaviours directly like this?
e
I think we had a GitHub issue for that, but I can't find it. It'd require some refactoring, but I can imagine we could inject the mapper itself as the first and always available mapping. Wdyt?
r
Yeah, I did have a look myself but couldn't find anything. Your proposal sounds good, but is there a reason that wasn't the case initially?
e
The details are fuzzy, and the context is probably spread in a few GitLab issues and MRs 😕https://gitlab.com/meltano/meltano/-/merge_requests/2481https://gitlab.com/meltano/meltano/-/issues/2299https://gitlab.com/meltano/meltano/-/issues/3273
r
I think we had a GitHub issue for that,
Might be this one? https://github.com/meltano/meltano/issues/3233 or at least part of it.
👀 1
meltano invoke mapper
was already addressed by https://github.com/meltano/meltano/pull/7992.
e
Ah I didn't realize
meltano invoke <mapper>
actually worked! It doesn't seem to difficult then to do the same for mappers.