def METHOD_NAME(name=None, type=None, options=None, organization="default"):
    """Create new data source."""
    if name is None:
        name = click.prompt("Name")
    if type is None:
        print("Select type:")
        for i, query_runner_name in enumerate(query_runners.keys()):
            print("{}. {}".format(i + 1, query_runner_name))
        idx = 0
        while idx < 1 or idx > len(list(query_runners.keys())):
            idx = click.prompt("[{}-{}]".format(1, len(query_runners.keys())), type=int)
        type = list(query_runners.keys())[idx - 1]
    else:
        validate_data_source_type(type)
    query_runner = query_runners[type]
    schema = query_runner.configuration_schema()
    if options is None:
        types = {"string": str, "number": int, "boolean": bool}
        options_obj = {}
        for k, prop in schema["properties"].items():
            required = k in schema.get("required", [])
            default_value = "<<DEFAULT_VALUE>>"
            if required:
                default_value = None
            prompt = prop.get("title", k.capitalize())
            if required:
                prompt = "{} (required)".format(prompt)
            else:
                prompt = "{} (optional)".format(prompt)
            _type = types[prop["type"]]
            def value_proc(value):
                if value == default_value:
                    return default_value
                return convert_type(_type, default_value)(value)
            value = click.prompt(
                prompt,
                default=default_value,
                type=_type,
                show_default=False,
                value_proc=value_proc,
            )
            if value != default_value:
                options_obj[k] = value
        options = ConfigurationContainer(options_obj, schema)
    else:
        options = ConfigurationContainer(json_loads(options), schema)
    if not options.is_valid():
        print("Error: invalid configuration.")
        exit(1)
    print("Creating {} data source ({}) with options:\n{}".format(type, name, options.to_json()))
    data_source = models.DataSource.create_with_group(
        name=name,
        type=type,
        options=options,
        org=models.Organization.get_by_slug(organization),
    )
    models.db.session.commit()
    print("Id: {}".format(data_source.id))