awswrangler.timestream.query

awswrangler.timestream.query(sql: str, boto3_session: Optional[boto3.session.Session] = None)pandas.core.frame.DataFrame

Run a query and retrieve the result as a Pandas DataFrame.

Parameters
  • sql (str) – SQL query.

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 Session will be used if boto3_session receive None.

Returns

Pandas DataFrame https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html

Return type

pd.DataFrame

Examples

Running a query and storing the result as a Pandas DataFrame

>>> import awswrangler as wr
>>> df = wr.timestream.query('SELECT * FROM "sampleDB"."sampleTable" ORDER BY time DESC LIMIT 10')