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
|None
) – 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 (
Session
|None
) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.
- Return type:
dict
[str
,str
]- Returns:
All parameters after the upsert.
Examples
>>> import awswrangler as wr >>> pars = wr.catalog.upsert_table_parameters( ... parameters={"source": "mysql", "destination": "datalake"}, ... database="...", ... table="...", ... )