cory_hurst
01/13/2022, 4:07 PMedgar_ramirez_mondragon
01/13/2022, 4:18 PMcory_hurst
01/13/2022, 4:19 PMELT could not be completed: Cannot start extractor: Executable 'tap-salesforce' could not be found. Extractor 'tap-salesforce' may not have been installed yet using `meltano install extractor tap-salesforce`, or the executable name may be incorrect.
cory_hurst
01/13/2022, 4:19 PMcory_hurst
01/13/2022, 4:20 PMcory_hurst
01/13/2022, 4:21 PM[Errno 8] Exec format error: '/project/.meltano/extractors/tap-salesforce/venv/bin/python'
edgar_ramirez_mondragon
01/13/2022, 6:13 PMdocker-compose.yml
that mounts the entire project, including the .meltano/
dir so your venvs are also mounted, which is problematic. So as a solution, you might wanna run a clean install (remove and recreate) with
meltano install --clean
cory_hurst
01/13/2022, 6:52 PMmeltano install --clean
cory_hurst
01/13/2022, 6:52 PMcory_hurst
01/13/2022, 6:55 PMmeltano elt tap target --job-id job1
cory_hurst
01/13/2022, 6:56 PMmeltano-ui_1 | 2022-01-13T18:53:53.509898Z [error ] exception calling callback for <Future at 0x7f3634c090f0 state=finished raised FileNotFoundError>
meltano-ui_1 | Traceback (most recent call last):
meltano-ui_1 | File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
meltano-ui_1 | callback(self)
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/flask_executor/executor.py", line 28, in propagate_exceptions_callback
meltano-ui_1 | raise exc
meltano-ui_1 | File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
meltano-ui_1 | result = self.fn(*self.args, **self.kwargs)
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/flask_executor/executor.py", line 20, in wrapper
meltano-ui_1 | return fn(*args, **kwargs)
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/flask/ctx.py", line 158, in wrapper
meltano-ui_1 | return f(*args, **kwargs)
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/meltano/api/executor/__init__.py", line 32, in defer_run_schedule
meltano-ui_1 | env={"MELTANO_JOB_TRIGGER": "ui"},
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/meltano/core/schedule_service.py", line 156, in run
meltano-ui_1 | ["elt", *schedule.elt_args, *args], env={**schedule.env, **env}, **kwargs
meltano-ui_1 | File "/usr/local/lib/python3.6/site-packages/meltano/core/meltano_invoker.py", line 23, in invoke
meltano-ui_1 | env=self._executable_env(env)
meltano-ui_1 | File "/usr/local/lib/python3.6/subprocess.py", line 423, in run
meltano-ui_1 | with Popen(*popenargs, **kwargs) as process:
meltano-ui_1 | File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
meltano-ui_1 | restore_signals, start_new_session)
meltano-ui_1 | File "/usr/local/lib/python3.6/subprocess.py", line 1364, in _execute_child
meltano-ui_1 | raise child_exception_type(errno_num, err_msg, err_filename)
meltano-ui_1 | FileNotFoundError: [Errno 2] No such file or directory: '/project/.meltano/run/bin': '/project/.meltano/run/bin'
cory_hurst
01/13/2022, 6:56 PMcory_hurst
01/13/2022, 7:41 PMcory_hurst
01/13/2022, 7:41 PM# For these examples to work, ensure that
# Docker has been installed
docker --version
# Add Docker files to your project
meltano add files docker
# Build Docker image containing
# Meltano, your project, and all of its plugins
docker build --tag meltano-demo-project:dev .
Your meltano-demo-project:dev Docker image is now ready for its first container!
# View Meltano version
docker run meltano-demo-project:dev --version
# Run gitlab-to-jsonl pipeline with
# mounted volume to exfiltrate target-jsonl output
docker run \
--volume $(pwd)/output:/project/output \
meltano-demo-project:dev \
elt tap-salesforce target-redshift --job_id=gitlab-to-postgres
cory_hurst
01/13/2022, 7:42 PM➜ convertiv-salesforce git:(master) ✗ docker run \
> --volume $(pwd)/output:/project/output \
> meltano-demo-project:dev \
> elt tap-salesforce target-redshift --job_id=gitlab-to-postgres
2022-01-13T19:39:02.291600Z [info ] Running extract & load... job_id=gitlab-to-postgres name=meltano run_id=6f43835a-0b71-45e0-a502-c1aba6499112
2022-01-13T19:39:02.414712Z [warning ] No state was found, complete import.
2022-01-13T19:39:02.968743Z [info ] ELT could not be completed: Cannot start extractor: Catalog discovery failed: command ['/project/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/project/.meltano/run/elt/gitlab-to-postgres/6f43835a-0b71-45e0-a502-c1aba6499112/tap.e3e7749c-dfab-433e-b862-cdd8f3df5b4a.config.json', '--discover'] returned 1 cmd_type=elt job_id=gitlab-to-postgres name=meltano run_id=6f43835a-0b71-45e0-a502-c1aba6499112 stdio=stderr
ELT could not be completed: Cannot start extractor: Catalog discovery failed: command ['/project/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/project/.meltano/run/elt/gitlab-to-postgres/6f43835a-0b71-45e0-a502-c1aba6499112/tap.e3e7749c-dfab-433e-b862-cdd8f3df5b4a.config.json', '--discover'] returned 1
cory_hurst
01/13/2022, 7:42 PMedgar_ramirez_mondragon
01/13/2022, 8:03 PM.meltano/
and probably passing secrets. Can you try running with debug enabled?
docker run \
--volume $(pwd)/output:/project/output \
--env MELTANO_LOG_LEVEL=debug
meltano-demo-project:dev \
elt tap-salesforce target-redshift --job_id=gitlab-to-postgres
cory_hurst
01/13/2022, 8:05 PMELT could not be completed: Cannot start extractor: Catalog discovery failed: command ['/project/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/project/.meltano/run/elt/gitlab-to-postgres/b0ff6acc-506f-4479-a543-387c0448c185/tap.e43ad727-00d5-4351-baf7-d5e7a365e4cb.config.json', '--discover'] returned 1
cory_hurst
01/13/2022, 8:05 PMcory_hurst
01/13/2022, 8:21 PM➜ convertiv-salesforce git:(master) ✗ docker run \
> --volume $(pwd)/output:/project/output \
> --env MELTANO_LOG_LEVEL=debug \
> meltano-demo-project:dev \
> elt tap-salesforce target-redshift --job_id=gitlab-to-postgres
2022-01-13T20:21:18.359226Z [info ] Running extract & load... job_id=gitlab-to-postgres name=meltano run_id=7724df1c-90dc-4a11-a7bf-c1a683bd632e
2022-01-13T20:21:18.507799Z [warning ] No state was found, complete import.
2022-01-13T20:21:19.102020Z [info ] ELT could not be completed: Cannot start extractor: Catalog discovery failed: command ['/project/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/project/.meltano/run/elt/gitlab-to-postgres/7724df1c-90dc-4a11-a7bf-c1a683bd632e/tap.588558c0-c39f-4648-b0b5-6384b443ef1d.config.json', '--discover'] returned 1 cmd_type=elt job_id=gitlab-to-postgres name=meltano run_id=7724df1c-90dc-4a11-a7bf-c1a683bd632e stdio=stderr
ELT could not be completed: Cannot start extractor: Catalog discovery failed: command ['/project/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/project/.meltano/run/elt/gitlab-to-postgres/7724df1c-90dc-4a11-a7bf-c1a683bd632e/tap.588558c0-c39f-4648-b0b5-6384b443ef1d.config.json', '--discover'] returned 1
edgar_ramirez_mondragon
01/13/2022, 8:47 PMwhat does that catalog discovery indicate?The Singer spec uses a catalog file to store inspected schemas and metadata (like primary keys) and to allow you to modify it to update replication methods, etc. So Meltano first runs
<tap-executable> --discover
to generate that catalog file.
Can you change MELTANO_LOG_LEVEL
to MELTANO_CLI_LOG_LEVEL
? For some reason the former is not being picked up by the CLI (cc @taylor, see https://gitlab.com/meltano/meltano/-/issues/3158)cory_hurst
01/13/2022, 9:21 PMedgar_ramirez_mondragon
01/13/2022, 9:34 PMCannot create credentials from config.
According to the code, it means at least one setting is missing either for basic or oauth. Looks like you're missing client_secret
and refresh_token
.
You can check if/whence they're being picked up with meltano config tap-salesforce list
.cory_hurst
01/13/2022, 9:41 PMcory_hurst
01/13/2022, 9:43 PMcory_hurst
01/13/2022, 9:45 PMedgar_ramirez_mondragon
01/13/2022, 9:48 PMdo I need to do somethign to make them visible/ pass them other than have them in the .env file in the project directory?Nope, having them
.env
should be enough, which makes me think they might not have the right names in the filecory_hurst
01/13/2022, 9:53 PMTARGET_REDSHIFT_PASSWORD=""
TARGET_REDSHIFT_AWS_ACCESS_KEY_ID=""
TARGET_REDSHIFT_AWS_SECRET_ACCESS_KEY=""
TAP_SALESFORCE_CLIENT_SECRET=""
TAP_SALESFORCE_REFRESH_TOKEN=""
cory_hurst
01/13/2022, 9:55 PMedgar_ramirez_mondragon
01/13/2022, 9:57 PMmeltano config tap-salesforce list
:
client_id [env: ...] current value: xyz (from .env)
client_secret [env: ...] current value: ... (from ?)
...
the "env" part should tell what variables names it expectscory_hurst
01/13/2022, 10:09 PMcory_hurst
01/13/2022, 10:10 PMcory_hurst
01/13/2022, 10:10 PMARG MELTANO_IMAGE=meltano/meltano:latest
FROM $MELTANO_IMAGE
WORKDIR /project
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Install all plugins into the `.meltano` directory
COPY ./meltano.yml .
RUN meltano install
# Pin `discovery.yml` manifest by copying cached version to project root
RUN cp -n .meltano/cache/discovery.yml . 2>/dev/null || :
# Don't allow changes to containerized project files
ENV MELTANO_PROJECT_READONLY 1
# Copy over remaining project files
COPY . .
# Expose default port used by `meltano ui`
EXPOSE 5000
ENTRYPOINT ["meltano"]
cory_hurst
01/13/2022, 10:21 PMedgar_ramirez_mondragon
01/13/2022, 10:22 PM.env
won't be COPYed into the image because it's ignored (see your .dockerignore
. You can pass an env file to either docker run
and it will create environment variables for you:
docker run --envfile .env ...
cory_hurst
01/13/2022, 10:29 PM