Skip to content

fetchmany in redshift-connector is different from SQLAlchemy throws an error #1059

@szsiddiq

Description

@szsiddiq

What happens?

When trying to use redshift-connector, the connection is made successfully, but all queries result in the following error:
`RuntimeError: Error running the query: Cursor.fetchmany() got an unexpected keyword argument 'size'

Digging in it looks like the redshift_connector package's cursor function users num as the result size variable instead of size, the way the native SQLAlchemy version does.

This arises in jupysql in the ResultSet class where the size variable name is explicitly called.

To Reproduce

Created a native connection using redshift_connector and attempted to run any query

import redshift_connector
import sqlalchemy as sa
%load_ext sql

rsconnect = redshift_connector.connect(
        <connection_details>
     )

%sql rsconnect --alias redshift-native
%sql select 1

OS:

Linux

JupySQL Version:

0.11.1

Full Name:

s s

Affiliation:

s

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