awswrangler.catalog.upsert_table_parameters

awswrangler.catalog.upsert_table_parameters(parameters: dict[str, str], database: str, table: str, catalog_versioning: bool = False, catalog_id: str | None = None, boto3_session: Session | None = None) dict[str, str]

Insert or Update the received 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 upsert.

Return type:

Dict[str, str]

Examples

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