awswrangler.data_api.redshift.read_sql_query

awswrangler.data_api.redshift.read_sql_query(sql: str, con: awswrangler.data_api.redshift.RedshiftDataApi, database: Optional[str] = None) pandas.core.frame.DataFrame

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

Parameters
  • 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.

Returns

Return type

A Pandas dataframe containing the query results.