emcp
05/22/2023, 7:14 AMhaleemur_ali
05/23/2023, 4:19 PMemcp
05/23/2023, 7:30 PMemcp
05/23/2023, 8:07 PM$ meltano select tap-ibkr-news --list --all
2023-05-23T19:56:15.067682Z [info ] The default environment 'dev' will be ignored for `meltano select`. To configure a specific environment, please use the option `--environment=<environment name>`.
Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to
join our friendly Slack community.
Cannot list the selected attributes: Could not find catalog. Verify that the tap supports discovery mode and advertises the `discover` capability as well as either `catalog` or `properties`
emcp
05/23/2023, 9:28 PMemcp
05/23/2023, 9:33 PM{
"extractors": {
"tap-ibkr": {
"tap": "tap-ibkr",
"properties": {
"host_tws_thrift": "127.0.0.1",
"tws_thrift_port": 9090,
"tickers_db_host": "127.0.0.1",
"tickers_db_username": "juju_meltano",
"tickers_db_password": "1234",
"tickers_db_type": "hive",
"output_timestamp_format": "hive"
}
}
}
}
emcp
05/24/2023, 9:15 PMConfig validation failed: 'host_tws_thrift' is a required property; 'tws_thrift_port' is a required property; 'tickers_db_host' is a required property; 'tickers_db_username' is a required property; 'tickers_db_password' is a required property; 'tickers_db_type' is a required property; 'output_timestamp_format' is a required property
JSONSchema was: {'type': 'object', 'properties': {'host_tws_thrift': {'type': ['string']}, 'tws_thrift_port': {'type': ['integer']}, 'tickers_db_host': {'type': ['string']}, 'tickers_db_username': {'type': ['string']}, 'tickers_db_password': {'type': ['string']}, 'tickers_db_type': {'type': ['string']}, 'output_timestamp_format': {'type': ['string']}, 'stream_maps': {'type': ['object', 'null'], 'properties': {}, 'description': 'Config object for stream maps capability. For more information check out [Stream Maps](<https://sdk.meltano.com/en/latest/stream_maps.html).>'}, 'stream_map_config': {'type': ['object', 'null'], 'properties': {}, 'description': 'User-defined config values to be used within map expressions.'}, 'flattening_enabled': {'type': ['boolean', 'null'], 'description': "'True' to enable schema flattening and automatically expand nested properties."}, 'flattening_max_depth': {'type': ['integer', 'null'], 'description': 'The max depth to flatten schemas.'}}, 'required': ['host_tws_thrift', 'tws_thrift_port', 'tickers_db_host', 'tickers_db_username', 'tickers_db_password', 'tickers_db_type', 'output_timestamp_format']}
emcp
05/24/2023, 9:16 PMemcp
05/24/2023, 9:21 PMemcp
05/24/2023, 9:21 PMemcp
05/24/2023, 9:30 PMemcp
05/25/2023, 7:22 PM/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/bin/python /home/emcp/Dev/git/STONKS/stonks-tap-ibkr/tap-ibkr/tap_ibkr/tap.py --config=ENV --test
Traceback (most recent call last):
File "/home/emcp/Dev/git/STONKS/stonks-tap-ibkr/tap-ibkr/tap_ibkr/tap.py", line 30, in <module>
Tapibkr.cli()
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 519, in cli
tap = cls( # type: ignore[operator]
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 103, in __init__
self.mapper.register_raw_streams_from_catalog(self.catalog)
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 166, in catalog
self._catalog = self.input_catalog or self._singer_catalog
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 287, in _singer_catalog
for stream in self.streams.values()
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 128, in streams
for stream in self.load_streams():
File "/home/emcp/.cache/pypoetry/virtualenvs/stonks-tap-ibkr-GGawKcX6-py3.10/lib/python3.10/site-packages/singer_sdk/tap_base.py", line 329, in load_streams
parents = streams_by_type[stream_type.parent_stream_type]
KeyError: <class 'tap_ibkr.client.NewsStream'>
in pycharm I get no errors and the class exists... just seems i need to reread the directions once more and inject the class somewhere..
from typing import List
from singer_sdk import Tap, Stream
from singer_sdk import typing as th # JSON schema typing helpers
from tap_ibkr.streams import IBNewsStream, IBNewsBodyStream
STREAM_TYPES = [
IBNewsStream,
IBNewsBodyStream
]
class Tapibkr(Tap):
"""ibkr tap class."""
name = "tap-ibkr"
config_jsonschema = th.PropertiesList(
th.Property("host_tws_thrift", th.StringType, required=True),
th.Property("trino_host", th.StringType, required=True),
th.Property("output_timestamp_format", th.StringType, required=True)
).to_dict()
def discover_streams(self) -> List[Stream]:
"""Return a list of discovered streams."""
return [stream_class(tap=self) for stream_class in STREAM_TYPES]
if __name__ == "__main__":
Tapibkr.cli()
emcp
05/25/2023, 7:29 PM