Skip to content

NuoDB

Bases: Spout

__init__(output, state, **kwargs)

Initialize the NuoDB 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 NuoDB rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --args url=http://mynuodbhost:8080/v1/statement query="SELECT * FROM mytable"

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_nuodb_spout:
        name: "NuoDB"
        method: "fetch"
        args:
            url: "http://mynuodbhost:8080/v1/statement"
            query: "SELECT * FROM mytable"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(url, query)

📖 Fetch data from a NuoDB table and save it in batch.

Parameters:

Name Type Description Default
url str

The URL of the NuoDB API endpoint.

required
query str

The SQL query to execute.

required

Raises:

Type Description
Exception

If unable to connect to the NuoDB server or execute the query.