Skip to content

Oracle

Bases: Spout

__init__(output, state, **kwargs)

Initialize the OracleSQL 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 OracleSQL rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --args server=localhost port=1521 service_name=myservice user=myuser password=mypassword

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_oraclesql_spout:
        name: "OracleSQL"
        method: "fetch"
        args:
            server: "localhost"
            port: 1521
            service_name: "myservice"
            user: "myuser"
            password: "mypassword"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(server, port, service_name, user, password, query)

📖 Fetch data from an Oracle SQL database and save it in batch.

Parameters:

Name Type Description Default
server str

The Oracle SQL server.

required
port int

The Oracle SQL port.

required
service_name str

The Oracle service name.

required
user str

The Oracle user.

required
password str

The Oracle password.

required
query str

The SQL query to execute.

required

Raises:

Type Description
Exception

If unable to connect to the Oracle SQL server or execute the query.