Skip to content

ArangoDB

Bases: Spout

__init__(output, state, **kwargs)

Initialize the Arango class.

Parameters:

Name Type Description Default
output BatchOutput

An instance of the BatchOutput class for saving the data.

required
state State

An instance of the State class for maintaining the state.

required
**kwargs

Additional keyword arguments.

{}

Using geniusrise to invoke via command line

genius Arango rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --args host=myarangodb.example.com username=myusername password=mypassword database=mydb collection=mycollection

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_arangodb_spout:
        name: "Arango"
        method: "fetch"
        args:
            host: "myarangodb.example.com"
            username: "myusername"
            password: "mypassword"
            database: "mydb"
            collection: "mycollection"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(host, username, password, database, collection)

📖 Fetch data from an ArangoDB collection and save it in batch.

Parameters:

Name Type Description Default
host str

The ArangoDB host.

required
username str

The ArangoDB username.

required
password str

The ArangoDB password.

required
database str

The ArangoDB database name.

required
collection str

The name of the ArangoDB collection.

required

Raises:

Type Description
Exception

If unable to connect to the ArangoDB server or execute the command.