You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to update multiple columns that have the same metadata kwargs at once, or pass in metadata updates to multiple columns as a dictionary.
Expected behavior
Add two methods to the metadata, update_columns which updates all the given columns with the same metadata kwargs and update_columns_metadata which updates columns using metadata from the input dictionary. We should validate the inputs to verify that the columns exist and the provided arguments are valid.
Single Table API
update_columns(column_names, **metadata_kwargs)
column_names (list[str]) - a list of column names that should be updated
**metadata_kwargs - Any key word arguments that describe metadata for the column (i.e. sdtype, pii, computer_representation, etc.)
Problem Description
As a user, it would be nice if I could update multiple columns in my metadata at once, instead of having to use
update_column
for every column.I'd like to be able to update multiple columns that have the same metadata kwargs at once, or pass in metadata updates to multiple columns as a dictionary.
Expected behavior
Add two methods to the metadata,
update_columns
which updates all the given columns with the same metadata kwargs andupdate_columns_metadata
which updates columns using metadata from the input dictionary. We should validate the inputs to verify that the columns exist and the provided arguments are valid.Single Table API
update_columns(column_names, **metadata_kwargs)
column_names (list[str])
- a list of column names that should be updated**metadata_kwargs
- Any key word arguments that describe metadata for the column (i.e.sdtype
,pii
,computer_representation
, etc.)update_columns_metadata(column_metadata_dict)
column_metadata_dict (dict)
- a dictionary mapping column names to column metadata (i.e.{'amount': {'sdtype': 'numerical'}}
Multi Table
update_columns(table_name, column_names, **metadata_kwargs)
table_name (str)
- the name of the target tablecolumn_names (list[str])
- a list of column names that should be updated**metadata_kwargs
- Any key word arguments that describe metadata for the column (i.e.sdtype
,pii
,computer_representation
, etc.)update_columns_metadata(table_name, column_metadata_dict)
table_name (str)
- the name of the target tablecolumn_metadata_dict (dict)
- a dictionary mapping column names to column metadata (i.e.{'amount': {'sdtype': 'numerical'}}
The text was updated successfully, but these errors were encountered: