(self)
return available_adapters[numeric_choice - 1]
Ask the user which adapter (database) they'd like to use.
Ask the user which adapter (database) they'd like to use.
Ask the user which adapter ( database ) they d like to use .
def ask_for_adapter_choice(self) -> str:
        """Ask the user which adapter (database) they'd like to use."""
        available_adapters = list(_get_adapter_plugin_names())
        prompt_msg = (
            "Which database would you like to use?\n" +
            "\n".join([f"[{n+1}] {v}" for n, v in enumerate(available_adapters)]) +
            "\n\n(Don't see the one you want? https://docs.getdbt.com/docs/available-adapters)" +
            "\n\nEnter a number"
        )
        numeric_choice = click.prompt(prompt_msg, type=click.INT)
        return available_adapters[numeric_choice - 1]
def ask_for_adapter_choice ( self ) -> str : available_adapters = list ( _get_adapter_plugin_names ( ) ) prompt_msg = ( "Which database would you like to use?\n" + "\n" . join ( [ f"[{n+1}] {v}" for n , v in enumerate ( available_adapters ) ] ) + "\n\n(Don't see the one you want? https://docs.getdbt.com/docs/available-adapters)" + "\n\nEnter a number" ) numeric_choice = click . prompt ( prompt_msg , type = click . INT ) return available_adapters [ numeric_choice - 1 ]