code: public function getDatabaseById($id)
      {
  
          // iterate over the configured databases and return the one with the passed ID
          /** @var TechDivision\Import\Configuration\DatabaseInterface  $database */
          foreach ($this->databases as $database) {
              if ($database->getId() === $id) {
                  return $database;
              }
          }
  
          // throw an exception, if the database with the passed ID is NOT configured
          throw new \Exception(sprintf('Database with ID %s can not be found', $id));
      }
docs: Return's the database configuration with the passed ID.
  
  @param string $id The ID of the database connection to return
  
  @return \TechDivision\Import\Configuration\DatabaseConfigurationInterface The database configuration
  @throws \Exception Is thrown, if no database configuration is available