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

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

  • sql (str) – SQL query to run.

  • con (RdsDataApi) – A RdsDataApi 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.