pat_nadolny
11/04/2021, 9:24 PMpat_nadolny
11/04/2021, 9:25 PM{"bookmarks": {"daily_active_users": {"replication_key": "ga_date", "replication_key_value": "20211103"}, ...}}
pat_nadolny
11/04/2021, 9:26 PMpat_nadolny
11/04/2021, 9:26 PM{
"singer_state": {
"project_foo": "2021-11-02T00:00:00Z"
}
}
pat_nadolny
11/04/2021, 9:27 PMpat_nadolny
11/04/2021, 9:27 PM{"singer_state": {"bookmarks": {"daily_active_users": {"replication_key": "ga_date", "replication_key_value": "20211103"}...}}}
visch
11/04/2021, 11:48 PMelt command
? (I'd assume all of these things are true but thought I'd ask š )
To check does
meltano elt tap-google-analytics target-athena --job_id=123 --dump=state
return anything?
I've only had any issues with this when I forget about a job_id fwiwpat_nadolny
11/05/2021, 3:53 PMelt
and when I connect to my system db I can see the job and its state in there. I just see a difference in the state format of other taps where state works vs my state messages. That dump=state
command I get Could not find state file for this pipeline
but I see it in the DB in the last successful run {"singer_state": {"bookmarks": {"events": {"replication_key": "ga_date", "replication_key_value": "20211103"}}}}
pat_nadolny
11/05/2021, 3:55 PMaaronsteers
11/05/2021, 4:26 PM{"singer_state":
is a wrapper around what looks like a valid state: {"bookmarks": {"events": {"replication_key": "ga_date", "replication_key_value": "20211103"}}}
. To @vischās point, can you confirm in you are using a job ID in all invocations?aaronsteers
11/05/2021, 4:28 PMpat_nadolny
11/05/2021, 4:31 PMmeltano elt tap-google-analytics target-jsonl --job_id=new_job
meltano elt tap-google-analytics target-jsonl --job_id=new_job --dump=state
and the output is Could not find state file for this pipeline
and the DB record is:
"id","job_id","state","started_at","ended_at","payload","payload_flags","run_id","trigger","last_heartbeat_at"
112,new_job,SUCCESS,"2021-11-05 16:29:07.722740","2021-11-05 16:29:13.466263","{""singer_state"": {""bookmarks"": {""events"": {""replication_key"": ""ga_date"", ""replication_key_value"": ""20211104""}}}}",1,"156cfe1940d841acb068bb4e3ceafcc5",cli,"2021-11-05 16:29:13.064889"
aaronsteers
11/05/2021, 4:41 PMpat_nadolny
11/05/2021, 4:56 PMFileNotFoundError: [Errno 2] No such file or directory: '/Users/pnadolny/Documents/Git/GitLab/squared/data/.meltano/run/elt/new_job/a99bab1f-5bd6-4c14-b1c8-d8fa7502e3f2/state.json'
and that directory exists but not the file. Seems like the --dump=state message doesnt care about whats in the db only the directory? I did a full reinstall of meltano with no luck. Those directories are just empty every time. tap-gitlab target-jsonl does create those directories and populate with a state.json file š„“ . I can create an issue if thats helpful but it feels like it has to be related to my tap since tap-gitlab is workingaaronsteers
11/05/2021, 5:01 PMtap-gitlab target-jsonl does create those directories and populate with a state.json fileBizarre! And thanks for adding the CSV headers; that helps a lot. Just to confirm - can you run your tap (and compare with the other sample tap) by running in this manner:
tap-google-analytics | target-jsonl > stateout.json
aaronsteers
11/05/2021, 5:02 PMpat_nadolny
11/05/2021, 5:37 PM{"bookmarks": {"events": {"replication_key": "ga_date", "replication_key_value": "20211104"}}}
when using the tap directly. I tried tap-stack-exchange and it had the same behavior, good state in the DB but no file in the .meltano/run/elt/ folder. I'll create an issuevisch
11/05/2021, 6:06 PMpat_nadolny
11/05/2021, 7:15 PMpat_nadolny
11/05/2021, 7:17 PM.meltano/run/elt/
files persist or at least for tap-gitlab which I was using as my non-sdk based test tap.visch
11/05/2021, 7:21 PMandrew
11/08/2021, 2:15 PMmeltano --log-level=debug elt tap-salesforce target-redshift --job_id=salesforce_to_redshift --dump=state > extract/salesforce_to_redshift.state.json
Result :
```[109027|MainThread|root] [DEBUG] Deleted configuration at /home/ubuntu/meltano/zenchef/.meltano/run/elt/salesforce_to_redshift/652b357f-52c9-4575-9cf5-153eb0a461f8/tap.6be5bef0-070f-47e3-b59e-cc5283991b7f.config.json
[2021-11-08 111027,072] [109027|MainThread|meltano.cli.utils] [DEBUG] Could not find state file for this pipeline
Traceback (most recent call last):
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/core/plugin_invoker.py", line 293, in dump
return self.files[file_id].read_text()
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/async_generator/_util.py", line 53, in aexit
await self._agen.athrow(type, value, traceback)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/core/plugin_invoker.py", line 272, in _invoke
raise ExecutableNotFoundError(
meltano.core.plugin_invoker.ExecutableNotFoundError: 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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/cli/elt.py", line 191, in dump_file
content = await invoker.dump(file_id)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/core/plugin_invoker.py", line 298, in dump
raise err.cause
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/core/plugin_invoker.py", line 270, in _invoke
yield (popen_args, popen_options, popen_env)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/core/plugin_invoker.py", line 293, in dump
return self.files[file_id].read_text()
File "/usr/lib/python3.8/pathlib.py", line 1236, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/usr/lib/python3.8/pathlib.py", line 1222, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/usr/lib/python3.8/pathlib.py", line 1078, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/meltano/zenchef/.meltano/run/elt/salesforce_to_redshift/652b357f-52c9-4575-9cf5-153eb0a461f8/state.json'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/cli/__init__.py", line 44, in main
cli(obj={"project": None})
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/cli/params.py", line 23, in decorate
return func(*args, **kwargs)
File "/home/ubuntu/meltano/.venv/lib/python3.8/site-packages/meltano/ā¦andrew
11/08/2021, 3:25 PMvisch
11/09/2021, 3:49 PM