|
14 | 14 | from airbyte_cdk.connector import Connector |
15 | 15 | from airbyte_cdk.exception_handler import init_uncaught_exception_handler |
16 | 16 | from airbyte_cdk.models import ( |
17 | | - AirbyteCatalog, |
18 | 17 | AirbyteMessage, |
19 | 18 | AirbyteMessageSerializer, |
20 | 19 | ConfiguredAirbyteCatalog, |
21 | 20 | ConfiguredAirbyteCatalogSerializer, |
| 21 | + DestinationCatalog, |
22 | 22 | Type, |
23 | 23 | ) |
24 | 24 | from airbyte_cdk.sources.utils.schema_helpers import check_config_against_spec_or_exit |
@@ -92,7 +92,7 @@ def parse_args(args: List[str]) -> argparse.Namespace: |
92 | 92 | class Destination(Connector, ABC): |
93 | 93 | VALID_CMDS = {"spec", "check", "discover", "write"} |
94 | 94 |
|
95 | | - def discover(self) -> AirbyteCatalog: |
| 95 | + def discover(self) -> DestinationCatalog: |
96 | 96 | """Implement to define what objects are available in the destination""" |
97 | 97 | raise NotImplementedError("Discover method is not implemented") |
98 | 98 |
|
@@ -162,7 +162,7 @@ def run_cmd(self, parsed_args: argparse.Namespace) -> Iterable[AirbyteMessage]: |
162 | 162 | if cmd == "check": |
163 | 163 | yield self._run_check(config=config) |
164 | 164 | elif cmd == "discover": |
165 | | - yield AirbyteMessage(type=Type.CATALOG, catalog=self.discover()) |
| 165 | + yield AirbyteMessage(type=Type.DESTINATION_CATALOG, destination_catalog=self.discover()) |
166 | 166 | elif cmd == "write": |
167 | 167 | # Wrap in UTF-8 to override any other input encodings |
168 | 168 | wrapped_stdin = io.TextIOWrapper(sys.stdin.buffer, encoding="utf-8") |
|
0 commit comments