awswrangler.data_api.redshift.read_sql_query(sql: str, con: RedshiftDataApi, database: str | None = None) DataFrame

Run an SQL query on a RedshiftDataApi connection and return the result as a DataFrame.

  • sql (str) – SQL query to run.

  • con (RedshiftDataApi) – A RedshiftDataApi connection instance

  • database (str) – Database to run query on - defaults to the database specified by con.

Return type:

A Pandas DataFrame containing the query results.