def do_discover(config): LOGGER.info("Starting discover") streams = discover_streams(config) if not streams: raise Exception("No streams found") catalog = {"streams": streams} json.dump(catalog, sys.stdout, indent=2) LOGGER.info("Finished discover")
def do_discover(config: Dict) -> None: """ Discovers the source by connecting to the it and collecting information about the given tables/streams, it dumps the information to stdout :param config: connection and streams information :return: nothing """ LOGGER.info("Starting discover") streams = discover_streams(config) if not streams: raise Exception("No streams found") catalog = {"streams": streams} ujson.dump(catalog, sys.stdout, indent=2) LOGGER.info("Finished discover")