awswrangler.data_quality.update_ruleset

awswrangler.data_quality.update_ruleset(name: str, updated_name: str | None = None, mode: str = 'overwrite', df_rules: DataFrame | None = None, dqdl_rules: str | None = None, description: str = '', boto3_session: Session | None = None) Any

Update Data Quality ruleset.

Note

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

Check out the Global Configurations Tutorial for details.

Parameters:
  • name (str) – Ruleset name.

  • updated_name (str) – New ruleset name if renaming an existing ruleset.

  • mode (str) – overwrite (default) or upsert.

  • df_rules (str, optional) – Data frame with rule_type, parameter, and expression columns.

  • dqdl_rules (str, optional) – Data Quality Definition Language definition.

  • description (str) – Ruleset description.

  • boto3_session (boto3.Session, optional) – Boto3 Session. If none, the default boto3 session is used.

Examples

Overwrite rules in the existing ruleset. >>> wr.data_quality.update_ruleset( >>> name=”ruleset”, >>> new_name=”my_ruleset”, >>> dqdl_rules=”Rules = [ RowCount between 1 and 3 ]”, >>>)

Update or insert rules in the existing ruleset. >>> wr.data_quality.update_ruleset( >>> name=”ruleset”, >>> mode=”insert”, >>> dqdl_rules=”Rules = [ RowCount between 1 and 3 ]”, >>>)