def run(url, output, config):
parsed_url = urlparse.urlparse(url)<EOL>db_module_path = SUPPORTED_DATABASE_MODULES.get(parsed_url.scheme)<EOL>if not db_module_path:<EOL><INDENT>raise ValueError("<STR_LIT>" % (parsed_url.scheme,))<EOL><DEDENT>db_module = importlib.import_module(db_module_path)<EOL>session.reset()<EOL>for line in db_module.sanitize(url=parsed_url, config=config):<EOL><INDENT>output.write(line + "<STR_LIT:\n>")<EOL><DEDENT>
Extracts database dump from given database URL and outputs sanitized
copy of it into given stream.

:param url: URL to the database which is to be sanitized.
:type url: str

:param output: Stream where sanitized copy of the database dump will be
               written into.
:type output: file

:param config: Optional sanitizer configuration to be used for sanitation
               of the values stored in the database.
:type config: database_sanitizer.config.Configuration|None