meltano / meltano

Meltano: the declarative code-first data integration engine that powers your wildest data and ML-powered product ideas. Say goodbye to writing, maintaining, and scaling your own API integrations.
https://meltano.com/
MIT License
1.71k stars 150 forks source link

bug: Can't install meltano-map-transformer on Meltano v3 #8224

Open peterspiro opened 9 months ago

peterspiro commented 9 months ago

Meltano Version

3.1.0

Python Version

3.9

Bug scope

CLI (options, error messages, logging, etc.)

Operating System

OSX

Description

I'm getting the error:

Mapper 'meltano-map-transformer' is not known to Meltano. Try running `meltano lock --update --all` to ensure your plugins are up to date.

when I try to either install meltano-map-transformer or run a job containing a mapping. The error isn't resolved by running meltano lock --update --all.

The error doesn't occur with Meltano v2. It looks like it may have been introduced by https://github.com/meltano/meltano/pull/7992.

Code

mappers:
    - name: meltano-map-transformer
      pip_url: "git+https://github.com/MeltanoLabs/meltano-map-transform.git"
      executable: meltano-map-transform
      mappings:
        - name: rename_column
          config:
            stream_maps:
              demographics:
                foo_text: foo
                foo: null
edgarrmondragon commented 9 months ago

Here's a potential workaround:

  1. Remove meltano-map-transformer from the project

  2. Use --from-ref to add the plugin

    meltano add mapper meltano-map-transformer --from-ref https://raw.githubusercontent.com/meltano/hub/main/_data/meltano/mappers/meltano-map-transformer/meltano.yml
  3. Add your mappings

peterspiro commented 9 months ago

Thanks @edgarrmondragon, that worked. It seems that the namespace config element is now required.

edgarrmondragon commented 9 months ago

I'd rather keep this open since the workaround makes the mapper a custom plugin. We probably want the plugin to work when added with meltano add mapper meltano-map-transformer.

edgarrmondragon commented 1 month ago

Related: