def METHOD_NAME(self) -> Iterable[str]:
    if not self.config.serviceConnection.__root__.config.ingestAllDatabases:
        configured_db = self.config.serviceConnection.__root__.config.database
        self.set_inspector(database_name=configured_db)
        yield configured_db
    else:
        results = self.connection.execute(
            "SELECT name FROM master.sys.databases order by name"
        )
        for res in results:
            row = list(res)
            new_database = row[0]
            database_fqn = fqn.build(
                self.metadata,
                entity_type=Database,
                service_name=self.context.database_service.name.__root__,
                database_name=new_database,
            )
            if filter_by_database(
                self.source_config.databaseFilterPattern,
                database_fqn
                if self.source_config.useFqnForFiltering
                else new_database,
            ):
                self.status.filter(database_fqn, "Database Filtered Out")
                continue
            try:
                self.set_inspector(database_name=new_database)
                yield new_database
            except Exception as exc:
                logger.debug(traceback.format_exc())
                logger.error(
                    f"Error trying to connect to database {new_database}: {exc}"
                )