awswrangler.catalog.overwrite_table_parameters

awswrangler.catalog.overwrite_table_parameters(parameters: Dict[str, str], database: str, table: str, catalog_versioning: bool = False, catalog_id: Optional[str] = None, boto3_session: Optional[boto3.session.Session] = None) Any

Overwrite all existing parameters.

Note

This function has arguments which can be configured globally through wr.config or environment variables:

  • catalog_id

  • database

Check out the Global Configurations Tutorial for details.

Parameters
  • parameters (Dict[str, str]) – e.g. {“source”: “mysql”, “destination”: “datalake”}

  • database (str) – Database name.

  • table (str) – Table name.

  • catalog_versioning (bool) – If True and mode=”overwrite”, creates an archived version of the table catalog before updating it.

  • catalog_id (str, optional) – The ID of the Data Catalog from which to retrieve Databases. If none is provided, the AWS account ID is used by default.

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

Returns

All parameters after the overwrite (The same received).

Return type

Dict[str, str]

Examples

>>> import awswrangler as wr
>>> pars = wr.catalog.overwrite_table_parameters(
...     parameters={"source": "mysql", "destination":  "datalake"},
...     database="...",
...     table="...")