Skip to content

Vertica

Bases: Spout

__init__(output, state, **kwargs)

Initialize the Vertica 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 Vertica rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --host my_host port=5433 user=my_user password=my_password database=my_database query="SELECT * FROM my_table"

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_vertica_spout:
        name: "Vertica"
        method: "fetch"
        args:
            host: "my_host"
            port: 5433
            user: "my_user"
            password: "my_password"
            database: "my_database"
            query: "SELECT * FROM my_table"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(host, port, user, password, database, query)

📖 Fetch data from a Vertica database and save it in batch.

Parameters:

Name Type Description Default
host str

The Vertica host.

required
port int

The Vertica port.

required
user str

The Vertica user.

required
password str

The Vertica password.

required
database str

The Vertica database name.

required
query str

The SQL query to execute.

required

Raises:

Type Description
Exception

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