When forking a branch, what's the best way to test...
# contributing
m
When forking a branch, what's the best way to test in a Meltano pipeline before raising a PR?
r
A plugin or Meltano itself?
m
A loader for example
r
Set a local editable
pip_url
to your package
Copy code
pip_url: -e <path>
and then
Copy code
meltano install <type> <name>
e.g.
meltano.yml
Copy code
version: 1
default_environment: dev
project_id: 70b74e31-2644-4c45-ba10-c064290af478
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-spotify
    variant: matatika
    pip_url: -e /home/reuben/Documents/taps/tap-spotify
Copy code
meltano install extractor tap-spotify
To test a loader, run any tap and capture the output
Copy code
meltano invoke <tap> > tap.out
and then run
Copy code
cat tap.out | meltano invoke <target>
🙌 1
➕ 1
❤️ 1
m
Perfect! Thank you very much this is exactly what I was looking for.
np 1
Hi @Reuben (Matatika), when I add the local editable pip url to my package and run
meltano install
I get the following error:
Copy code
Loader 'target-bigquery' is not known to Meltano. Try running `meltano lock --update --all` to ensure your plugins are up to date.`
r
Can you share your
meltano.yml
?
m
Copy code
loaders:
  - name: target-bigquery
    variant: myname
    pip_url: -e path_to_the_forked_repo_on_my_machine
r
Maybe try
Copy code
rm -rf .meltano/loaders/target-bigquery/
and then installing again?
m
No luck unfortunately. I'm wondering if I should be installing this like a custom plugin?
r
That
tap-spotify
example installed fine for me and I was able to
meltano invoke
without any issues... I'll try with
target-bigquery
.
m
Is it okay if I name the variant whatever I like if I specific a local path for the pip url?
r
I'm not sure - try keeping it the same (I didn't change it in my example).
m
Ah ok let me try
Nice it's worked! That did the trick!
👍 2
Thanks a lot. I can see the results of my contribution in the terminal 😀
😁 1
r
Yeah, it's probably falling back to the
.lock
file for the base plugin definition - effectively you are just providing overrides in the
meltano.yml
. Maybe by changing the
variant
it loses its reference to the
.lock
file (since it's not a custom plugin).
e
FWIW, yes the lock file is resolved with the plugin and variant name. So, if you change the variant name, a different lock-file name is expected.
🙌 1