fred_reimer
11/05/2021, 7:14 PMtap-athena | extractor | File ".../meltano/.meltano/extractors/tap-athena/venv/lib/python3.9/site-packages/singer_sdk/tap_base.py", line 514, in discover_streams
tap-athena | extractor | for catalog_entry in self.catalog_dict["streams"]:
tap-athena | extractor | KeyError: 'streams'
when I do a elt run. However, I can do a meltano invoke tap-athena --discover and get the discovery catalog. I'm trying to test a change before I submit the PR, to make the AWS credentials optional so they can be picked up via standard locations (env, default profile, instance creds, etc). With debug logging I get:
time=2021-11-05 15:09:19 name=tap-athena level=INFO message=Skipping parse of env var settings...
time=2021-11-05 15:09:19 name=tap-athena level=INFO message=Config validation passed with 0 errors and 0 warnings.
time=2021-11-05 15:09:19 name=root level=INFO message=Operator '__else__=None' was not found. Unmapped streams will be included in output.
time=2021-11-05 15:09:19 name=botocore.credentials level=INFO message=Found credentials in shared credentials file: ~/.aws/credentials
time=2021-11-05 15:09:50 name=botocore.credentials level=INFO message=Found credentials in shared credentials file: ~/.aws/credentials
[2021-11-05 15:10:21,414] [82571|MainThread|root] [DEBUG] Deleted configuration at .../meltano/.meltano/run/tap-athena/tap.....config.json
So it woks with discover, but when used as an actual target it can't use the discover to find the streams...visch
11/05/2021, 7:22 PMvisch
11/05/2021, 7:23 PMvisch
11/05/2021, 7:23 PMfred_reimer
11/05/2021, 7:35 PMtap-athena | extractor | for catalog_entry in self.catalog_dict["streams"]:
tap-athena | extractor | KeyError: 'streams'
It's failing when looking at the streams in the catalog. I tried running it with a catalog file that I saved from a --discover call and it failed also: meltano elt tap-athena target-postgres --catalog catalog.json
. Maybe it's something with my environment, I'll try building the docker image and running it in docker.edgar_ramirez_mondragon
11/05/2021, 7:41 PMtap-athena
is still experimental (using unreleased SDK features) so this may be a bug in how the input catalog is used to create stream instances at run time. cc @aaronsteersaaronsteers
11/05/2021, 7:51 PMaaronsteers
11/05/2021, 7:51 PMpat_nadolny
11/05/2021, 7:54 PMpat_nadolny
11/05/2021, 7:55 PMfred_reimer
11/05/2021, 8:14 PMfred_reimer
11/05/2021, 9:56 PMfred_reimer
11/07/2021, 10:09 PMif self.input_catalog:
return self.input_catalog
self.input_catalog just returns self._input_catalog
, which is a Catalog object, not a dict. This needs to be replaced with:
if self.input_catalog:
return self.input_catalog.to_dict()
I'll make a MR on the 263-sql-type-targets-and-sinks branch..fred_reimer
11/07/2021, 10:16 PMfred_reimer
11/07/2021, 10:31 PMaaronsteers
11/08/2021, 6:49 PMfred_reimer
11/12/2021, 2:26 PM