code: def download(
      self,
      to: "Output",
      jobs: Optional[int] = None,  # noqa: ARG002
      file_format: Optional[str] = None,
      **kwargs: Any,
  ) -> None:
      from dvc.database import client
      from dvc.ui import ui
  
      sql = self.sql
      if not sql:
          raise DvcException(
              "Cannot download: no query or table specified"
          )
  
      db_config = self.repo.config.get(self.PARAM_DB, {})
      config = db_config.get(self.connection)
      if not config:
          raise DvcException(
              f"connection {self.connection} not found in config"
          )
  
      file_format = file_format or self.db_info.get(
          self.PARAM_FILE_FORMAT, "csv"
      )
      with client(config) as db:
          msg = "Testing connection"
          with log_durations(logger.debug, msg), ui.status(
              msg
          ) as status:
              db.test_connection(onerror=status.stop)
          with download_progress(to) as progress:
              db.export(
                  sql, to.fs_path, format=file_format, progress=progress
              )
  
imports: from contextlib import contextmanager
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, Optional
  from funcy import compact, log_durations
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from .base import Dependency
label_desc: Use image node_id 10 for calling the DbDependency obj's underlying member method code with example usage: obj.download(to, jobs, file_format) without return types