awswrangler.db.get_redshift_temp_engine

awswrangler.db.get_redshift_temp_engine(cluster_identifier: str, user: str, database: Optional[str] = None, duration: int = 900, boto3_session: Optional[boto3.session.Session] = None) → sqlalchemy.engine.base.Engine

Get Glue connection details.

Parameters
  • cluster_identifier (str) – The unique identifier of a cluster. This parameter is case sensitive.

  • user (str, optional) – The name of a database user.

  • database (str, optional) – Database name. If None, the default Database is used.

  • duration (int, optional) – The number of seconds until the returned temporary password expires. Constraint: minimum 900, maximum 3600. Default: 900

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

Returns

SQLAlchemy Engine.

Return type

sqlalchemy.engine.Engine

Examples

>>> import awswrangler as wr
>>> engine = wr.db.get_redshift_temp_engine('my_cluster', 'my_user')