ploomber.testing.sql.duplicates_in_column

ploomber.testing.sql.duplicates_in_column(client, col: str | List[str], product) bool

Check if a column (or group of columns) has duplicated values

Parameters:
  • client – Database client

  • cols – Column(s) to check

  • product – The relation to check

Returns:

True if there are duplicates in the column(s). If passed more than one column, they are considered as a whole, not individually

Return type:

bool