Skip to content

Using bulk insert without command / Click #26

Open
@AubinMoreau

Description

@AubinMoreau

Hi, sorry to bother you with a question which is probably a simple one but is that possible (and if it is, how ?) to launch the code without using click or command and without giving every arguments ?

I just want to do this :
bulk_insert(graph, host, port, nodes, relations)

Without putting all parameters like this :
bulk_insert(graph, host, port, password, nodes, relations, separator, max_token_count, max_buffer_size, max_token_size, quote, field_types, skip_invalid_nodes, skip_invalid_edges)

But for now, the only way i found is (as you do on your test) by using Click :

from click.testing import CliRunner
from redisgraph_bulk_loader.bulk_insert import bulk_insert

def addToGraph(port,nodes,relations,graphName):
    runner = CliRunner()
    res = runner.invoke(bulk_insert, [
        "--port", port,
        "--nodes", nodes,
        "--relations", relations,
        graphName])

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions